Jun 13, 2012

Fast tip: Copying files that are scattered over folders (M3U playlist)...

Problem: I want to copy all the files from the M3U file to one folder, but it would take far too long to copy them manually and name correspondingly.

My quick batch file:
for /f "tokens=* eol=#" %%G in (%UserProfile%\Documents\myplaylist.m3u) do call:customcopy "%%G"
pause
exit
:customcopy
set/a cnt+=1
copy %1 %cnt%.mp3
exit/b0
The script may not handle some special characters; then you need to place setlocal EnableDelayedExpansion above the FOR command.

No comments:

Post a Comment