Let's say we have a target directory structure like this: C: My Music parent folder 01 - parent folder.mp3 C: My Music parent folder 02 - parent folder.mp3 C: My Music parent folder 03 - parent folder.mp3 C: My Music parent folder child folder 1 01 - child folder 1.mp3 C: My Music parent folder child folder 1 02 - child folder 1.mp3 C: My Music parent folder child folder 1 03 - child folder 1.mp3 C: My Music parent folder child folder 2 01 - child folder 2.mp3 C: My Music parent folder child folder 2 02 - child folder 2.mp3 C: My Music parent folder child folder 2 03 - child folder 2.mp3 So. If I just run Command Prompt from the 'parent folder' and type: dir /s /b *.mp3 > listall.txt I get an output text file with absolute path exactly as you see above. But this is not what I want. Spot on avery_larry your code works!! Thankyou ++++ I needed to change line 5 to append (>>) rather than overwrite (>) the text file. I made the code echo the results line-by-line in the console and added pauses between each line so I could visualize the runtime.

Yes sir, she kept outputting and outputting and outputting every line with relative path names. As you can see, I'm a DOS n00b. Dirty dancer mp4 video song free download. It would be nice for my learning if you could explain to me what each line is doing. What are the brackets doing from lines 3 to 6 and why are you indenting lines 4 and 5. Ummm, one last thing.

Oct 12, 2017 - Half 1 -Tips on how to document IPTV with the app IPTV excessive PRO to a tough. Does this work with any m3u playlist based IPTV service?

So to make your batch also rename listall.txt to [the name of the parent folder].m3u I add this code to the end of yours: set foldervar=%CD% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% ren listall.txt '%foldervar%.m3u' Is there a better way to code this function or do I really need to add all those lines? I'm pretty sure the answer has something to do with the FOR command.

Code: call echo%%file:%parent%=%%>>listall.txt This is where the magic happens. At the basic level, we're using a simple substring substitution to eliminate the parent directories. If your current directory was c: tmp then we're trying to do this: echo%file:c: tmp =% Which substitutes nothing (blank or nul) for c: tmp The rest of it I'm not going to explain very well, because it's quite complicated. The%parent% is the variable that contains the parent directory, which we want to blank out of the lines, effectively we are stripping 'c: my music parent folder' out of the dir's ouput. That's what this portion does::%parent%= Using the 'call' function allows us to evaluate the variable string twice. The first evaluation will expand any normal looking variables (single% surround) and it will evaluate any double percents as single percents.

Something like this. Ummm, one last thing.

Grasslin uni 45 manual transfer. So to make your batch also rename listall.txt to [the name of the parent folder].m3u I add this code to the end of yours: set foldervar=%CD% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% set foldervar=%foldervar:* =% ren listall.txt '%foldervar%.m3u'Is there a better way to code this function or do I really need to add all those lines? I'm pretty sure the answer has something to do with the FOR command. --thr333Well, you could do something similar to the above and strip out the parent folder from the current folder something like this: **untested**.