Expanding wildcards

  • Thread starter Thread starter BigMan
  • Start date Start date
B

BigMan

Is it possible ito expand

test.exe "spaced out\*.txt"

to smth like this

test.exe "spaced out\1.txt" "spaced out\2.txt" "spaced out\3.txt"
 
BigMan said:
Is it possible ito expand

test.exe "spaced out\*.txt"

to smth like this

test.exe "spaced out\1.txt" "spaced out\2.txt" "spaced out\3.txt"

C:\cmd>dir /s /b "\spaced out\*"
C:\spaced out\1.txt
C:\spaced out\2.txt
C:\spaced out\3.txt

C:\cmd>demo\spacedout
test.exe "c:\spaced out\1.txt" "c:\spaced out\2.txt" "c:\spaced out\3.txt"

C:\cmd>rlist demo\spacedout.cmd
=====begin C:\cmd\demo\spacedout.cmd ====================
1. @echo off
2. setlocal
3. set spacedout=
4. for %%a in ("c:\spaced out\*.txt") do call :concat "%%a"
5. echo test.exe %spacedout%
6. goto :EOF
7. :concat
8. set spacedout=%spacedout% %1
9. goto :EOF
=====end C:\cmd\demo\spacedout.cmd ====================
 
Back
Top