1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Listing files in a subfolder

Discussion in 'Support' started by rawood11, Oct 28, 2008.

  1. rawood11

    Joined:
    Oct 2, 2008
    Messages:
    19
    Likes Received:
    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?
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,351
    Likes Received:
    39
    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?
     

Share This Page