Create filelist with no extensions

February 21, 2011 at 16:20:56
Specs: Windows XP
Im building a database of about 10,000 files i need to somehow gather a list of these file names with the extension omitted. Been looking for hours but cannot find the answer. Im thinking the answer is somewere in Dos Syntax but i cant find it even through trial and error


See More: Create filelist with no extensions

Report •

#1
February 21, 2011 at 16:24:04
also... I need to gather a seperate list with these filenames and were they originated from ex

C:/Documents and Settings/Home/Main/Category/01/000034.jpg
C:/Documents and Settings/Home/Main/Category/01/000035.jpg


Report •

#2
February 21, 2011 at 16:33:30
run this from a command line, may be this is what you r looking for.

for /f %a in ('dir /s /b') do echo %~pna >>filelist.txt

Subhash Chandra.


Report •

#3
February 21, 2011 at 16:45:58
chandra thank you for the quick reply, but it didnt work. Im not very familiar with troubleshooting this so here it is i navigated to the directory using my cd syntax and once there pasted it in and it came back

'f /' is not recognized as an internal, external command, operable program or batch file


"Should it be /b?


Report •

Related Solutions

#4
February 21, 2011 at 16:48:13
oh wait i copied it but left out the word for so ill redo...

Report •

#5
February 21, 2011 at 16:57:46
It seems to be its hanging up, any suggestions?



Report •

#6
February 21, 2011 at 17:15:16
if it has to scan lots of fies it will hang a bit.. wait till it completes.

you will get your outout file in same folder as filelist.txt

Subhash Chandra.


Report •

#7
February 21, 2011 at 17:25:50
It gave me the list for all the subdirectorys for every file, but only going back to the parent directory, not all the way back to the root director (C:)... Pretty snazzy but not quite what i need here's what it gave me

Documents and Settings/Home/Main/Category/01/
Documents and Settings/Home/Main/Category/01/
etc

What im hoping it will do is

000034.jpg
000035.jpg
etc

but when it compiles the above list i need the extension omitted so it will read like this

000034
000035

Any and all feedbacks much appreciated, this will save me hours upon hours of work


Report •

#8
February 21, 2011 at 17:51:50
for /f %a in ('dir /s /b') do echo %~pdna >>filelist1.txt

this time check filelist1.txt.


it will give you the Drive\path\filenamewithout extenson.

What else you dont want ?

Subhash Chandra.


Report •

#9
February 21, 2011 at 18:11:22
Thanks, that added the root directory but not the file name without extension... As for what else i need just the file name without extension, so i can copy and paste into a spreadsheet without having to put delimiters in 10000 different strings

Report •

#10
February 21, 2011 at 18:16:10
itworks for me, it gives me the drive, path and filename.

anyway, try this as well.

for /f %a in ('dir /s /b') do echo %~n >>filename.txt


once you have the output in filename.txt you can use excel to concatinate them

Subhash Chandra.


Report •

#11
February 21, 2011 at 19:00:37
Alright neither of those worked for me at all but this one does

dir /a /-p /o:gen >filelist.txt

just need to get rid of the extention, how?


Report •

#12
February 22, 2011 at 07:35:49
import tihs file in excel and use . as delimetr instead of space

Subhash Chandra.


Report •

Ask Question