Move files in subfolders to a folder and rename windows prompt -
i have final command line, need rename part of it, reach goal want have this:
for /f “tokens=*” %a in (‘dir /b /s /a-d’) @copy “%a” “c:\yourfolder” /y
and works fine, in case have tons of folders 1 file on each one, file has same name file.ext, so, there way move , change name, example file1.ext, file2.ext,...
thanks!
this not foolproof it's work, , prompt if small likelihood occurs filename exists. you'll need batch file make foolproof , improve naming strategy.
remove @echo if happy result.
cmd /v:on /c /f "delims=" %a in ('dir /b /s /a-d') @echo copy “%a” “c:\yourfolder\%~na-!random!!random!!random!%~xa” /-y
Comments
Post a Comment