I'm using TCMDv27 on Windows 10 20H2 and trying to create a multi-line DO loop that loops through all of the first level subdirectory names in a targeted directory that I give it. But I cannot figure out what syntax to use to accomplish this. So assuming the directories involved are
Z:\Audio
+--CD
+--HD
+--MP3
I want to give the loop "Z:\Audio" and have its loop variable contain "CD", "HD", and "MP3" as it loops. The rest of the multi-line loop will do some processing with those subdirectory names.
I've been referring to the helpfile syntax below as the closest syntax I could find that might do this:
DO varname IN [range...] /D"directory" [/I:"text" /S[[+]n] /A:[[-|+]rhsadecijopt /O:[-]acdeginorstuz fileset [(command)]
But it's unclear how to accomplish this. What I'm currently using is
DO F in Music:\Audio\*
IF NOT ISDIR "%F" ITERATE
other processing
ENDDO
Note that Music: is a directory alias for a drive\directory combination.
But I'd like not to have to use the IF NOT ISDIR line because if the targeted directory has many files, the script will spend time iterating past all the files. Is there no way to tell DO just to process directories? I tried adding the /A:d switch but that didn't work.
TIA
David
Z:\Audio
+--CD
+--HD
+--MP3
I want to give the loop "Z:\Audio" and have its loop variable contain "CD", "HD", and "MP3" as it loops. The rest of the multi-line loop will do some processing with those subdirectory names.
I've been referring to the helpfile syntax below as the closest syntax I could find that might do this:
DO varname IN [range...] /D"directory" [/I:"text" /S[[+]n] /A:[[-|+]rhsadecijopt /O:[-]acdeginorstuz fileset [(command)]
But it's unclear how to accomplish this. What I'm currently using is
DO F in Music:\Audio\*
IF NOT ISDIR "%F" ITERATE
other processing
ENDDO
Note that Music: is a directory alias for a drive\directory combination.
But I'd like not to have to use the IF NOT ISDIR line because if the targeted directory has many files, the script will spend time iterating past all the files. Is there no way to tell DO just to process directories? I tried adding the /A:d switch but that didn't work.
TIA
David