I want to recursively list the absolute path to all files that end with mp3
from a given directory which should be given as relative directory.
I would then like to strip also the directory from the file and I have read that variables which are in a for
-scope must be enclosed in !
s. Is that right?
My current code looks like this:
for /r %%x in (*.mp3) do ( set di=%%x echo directory !di! C:\bla.exe %%x !di! )
Substitute dir /A:D. /B /S > FolderList. txt to produce a list of all folders and all subfolders of the directory. WARNING: This can take a while if you have a large directory.
The dir command displays a list of files and subdirectories in a directory. With the /S option, it recurses subdirectories and lists their contents as well.
How to get a recursive directory listing in Linux or Unix. Try any one of the following commands to see recursive directory listing: ls -R : Use the ls command to get recursive directory listing on Linux. find /dir/ -print : Run the find command to see recursive directory listing in Linux.
Use the command DIR
:
dir /s/b *.mp3
The above command will search the current path and all of its children. To get more information on how to use this command, open a command window and type DIR /?
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With