Listing files in a subfolder

Oct 2, 2008
19
0
rem ----- list subfolders
for /r /D j:\taqDAILYNBBO\ %x in (*) (

rem ----- list all files in the subfolder
for %x %y in (*) (
echo ticker= %y
)
)

This produces an error -- what am I doing wrong?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
rem ----- list subfolders
for /r /D j:\taqDAILYNBBO\ %x in (*) (

rem ----- list all files in the subfolder
for %x %y in (*) (
echo ticker= %y
)
)

This produces an error -- what am I doing wrong?

I don't see how FOR %X %Y can possibly be legal syntax...

I think you're trying to do something like this:

Code:
for /r /d j:\taqDAILYNBBO\ %x in ( * ) for %y in ( %x\* ) echo ticker= %y
Which could probably be simplified to:

Code:
for /r j:\taqDAILYNBBO\ %y in ( * ) echo ticker= %y
or even reduced to a DIR or PDIR. What's the object of the game?
 

Similar threads