1.

Solve : copy all pro?

Answer»

Hi dear friends,
I have MP3 FILES in my c\ drive in many different folders and i want to copy all these mp3s into new one folder in drive c or another drive. Can you please help how to write this command? any idea appreciated.This ought to work, just input the folder/drive where you want to copy it all to.

CODE: [Select]echo off
:DriveIn
cls
echo.Input Drive Letter to copy MP3s to(e.g. D for D Drive):
SET /p destdrive=?
echo.
echo.Input Folder under previously inputted Destination Drive(Type
echo.nothing to copy to Drive ROOT) or (e.g. if D Drive was previously
echo.inputted, "Folder1\Music" to copy to "D:\Folder1\Music").
set /p destfolder=?
dir "%destdrive%:\%destfolder%" /B
if ERRORLEVEL GEQ 2 (
echo.Invalid Drive, please Select a different drive
pause
goto DriveIn
)
for /r "C:\" %%a in (*.mp3) do (
copy "%%a" "%destdrive%:\%destfolder%"
echo.MP3 Found and copied:
echo.%%a
echo.
)
echo.All MP3s in C Drive copied to:
echo.%destdrive%:\%destfolder%
pause
exit
Give that a whirl.

Hope this helps
,Nick(macdad-)



Discussion

No Comment Found