Forum Moderators: open

Message Too Old, No Replies

Need to export filenames to a file

anybody know of a utility that will do this?

         

wingslevel

7:52 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



I have about 20k image files in a directory on my server.

I want to export the filenames out to a text file so that I can later match them up with the images that my db is calling (this way I can find missing images and ones that aren't being called at all).

Anybody know of a utility or some way to get windows explorer to do this?

Thanks...

kaled

10:57 pm on Jan 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Open the command line (cmd.exe in NT/2000/XP)
2) Navigate to the required directory using the cd command.
3) type dir /b>filelist.txt

A file called filelist.txt will be created with the directory contents. If you want to create the file list elsewhere, use a fully qualified file name or use the ..\ convention. Don't forget that Windows uses \ not / as directory delimiters.

Kaled.

longen

11:06 pm on Jan 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



XENU will produce a list of files not called in its Orphan Files report.

jcmoon

11:10 pm on Jan 11, 2006 (gmt 0)

10+ Year Member



XENU will produce a list of files not called in its Orphan Files report.

Caveat: this is true if Xenu has spidered the site before, and the files were linked-to before. If you've got new, unlinked files and/or haven't had Xenu spider your site before, it won't find them.

(unless I'm quite mistaken on how Xenu works ...)

longen

9:24 am on Jan 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've just run a test by loading a .txt file to the server root - and XENU has picked it up, looks like the program searches the entire directory structure.

jcmoon

4:42 pm on Jan 12, 2006 (gmt 0)

10+ Year Member



I didn't know Xenu did that. I wondered how.

I gave it a try, and it asks for FTP access, to determine what files are there. I'm impressed. Thanks!

I hadn't noticed before because in Prefs I set it to report Site Statistics only (I believed my sites were too big for anything else, and I didn't know it used FTP to determine orphaned files).

Thanks!

coopster

1:14 am on Jan 14, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I had a need for something along these lines many moons ago (10 years ago probably?) and wrote a mini .bat file to help out. Anyway, it still works for me ;)

Open your favorite text editor and save the following as a .bat file, something like 'listdir.bat'. It doesn't matter where you save it as long as it won't get deleted:

rem Right-click the name of this file 
rem and create a shortcut in the same folder.
rem On the Program tab of this shortcut
rem "Properties", check the Close on Exit
rem
rem Right-click on the shortcut and select copy.
rem Navigate to the Windows "Send To" folder
rem and right-click a blank space and
rem select "Paste Shortcut".
rem The Windows "Send To" folder is located
rem somewhere like the following:
rem "C:\Documents and Settings\MYNAME\SendTo"
rem
rem From now on, left-click a folder,
rem right-click and select "Send To"
rem and this shortcut for a directory listing.
rem
dir %1 /-p /a:-d /b /o > "%temp%\File List"
notepad "%temp%\File List"
erase "%temp%\File List"

Now just follow the directions in this .bat file to setup your Windows installation by creating your own right-click-context-menu option. I named mine something like "List Directory" so it made sense to me.

Use it if you like it ...

andrea99

3:28 am on Jan 14, 2006 (gmt 0)



here's a neat trick, not well known...

drag the folder into a Firefox, Moz or Netscape shortcut, the file names and other details will open as an HTML file. c+p

bsmither

8:30 am on Feb 1, 2006 (gmt 0)

10+ Year Member



I really like Karen Kenworthy's utility. It's free and versatile.

But I see that a possible scenario you are searching for a solution to is to get an Orphaned Files report. I, too, may have to give Xenu a look-see.

Still, wanting to compare the contents of a database implies you are serving up dynamic pages. Will Xenu do that? Perhaps flat navigation (must be a better word for that). But I'm harkening back to my early programming days on the 6502 with Indirect Indexes and Indexed Indirects.

longen

10:30 pm on Feb 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



XENU will read dynamic sites, you can export the results as a CSV file, load it into a spreadsheet, etc.

bill

2:51 am on Feb 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Xenu is for websites not the Windows file system. It will work fine on a web-server but I believe the original question was looking for ways to get file names from a network LAN server. I for one was unable to get Xenu to print out the file names of everything in my Windows system folder...

Robert Charlton

7:53 am on Feb 18, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I use a disk management utility called Total Commander, which will print lists of selected files via whatever printers you have installed in Windows.

Someone mentioned on the Total Commander forum that they have a print driver installed called "Generic/Text only," which they use in conjunction with the Print Selected Filenames option to send the names to disk. They didn't know, though, where they got that driver.

So... anyone know about the "Generic/Text only" print option?