Forum Home
Press F1
 
Thread ID: 31396 2003-03-20 11:31:00 Exporting file names to database big al (3416) Press F1
Post ID Timestamp Content User
129764 2003-03-20 11:31:00 Anyone know how I can quickly export just the names of files (like picture.gif) from a directory on my hard drive into a database or text file. big al (3416)
129765 2003-03-20 11:40:00 If it's just files in one directory I would use the dir command at a DOS prompt.

Eg, dir /b >> pics.txt
will create a text file in the directory you're in called pics.txt with a list of all the files and directories in that directory.

If you want it from nested directories I'd look towards the tree command.
-=JM=- (16)
129766 2003-03-20 12:17:00 once you have the list in a txt file you can pull it in to XL and do all the cool stuff with the data, like sorting in many ways ECT. robsonde (120)
129767 2003-03-20 22:30:00 Thanks JM. Sounds like a good option. Unfortunately my DOS knowledge is close to nothing. So I click on the DOS Prompt from my windows program menu and come up with a DOS screen and it's got C:\windows>. What do I type in next assuming the path to my directory is D:\pictures\web? big al (3416)
129768 2003-03-20 23:02:00 Ignore my last post JM. I sorted it out and it's working fine. Thanks a million. The text file opens up in excel with all I need already in a field column ready to cut and paste into my database. big al (3416)
1