Opening folders containing a string in Batch?

November 10, 2009 at 21:16:25
Specs: Windows 7
Ok, I have a folder which contains a lot of files, each starting with a unique, 2-digit number, followed by their name. My code contains:

set /P FILENAME=What is the number?:

for %%F in (%FILENAME%\*.tga) do ECHO file 0 = %%F > textfile.tcs

However, this only works if the folders entire name is specified, not just the first two digits (which is what I'd prefer), I tried specifying an unknown with %FILENAME%*, but it didn't work (as you can see, I'm new to this).

Thanks in advance, Milun.


See More: Opening folders containing a string in Batch?

Report •


#1
November 11, 2009 at 03:20:34
Post this in the Programming Forum on the right side of this page for more help.

Home Page http://ewen.uuuq.com/


Report •

#2
November 11, 2009 at 15:33:20
Thanks, sorry about that.

Report •

Related Solutions


Ask Question