Windows 7 Batch - Create subfolder, then find files with certain text in file name and move those files in the newly created subfolder -
tried best searching solution close need example did not work. bash: moving multiple files subfolders
i not programmer unable create batch file myself windows 7. appreciated.
needed code batch file following:-
- searches folder files have "_f1" in file name
- creates subfolder named "f1" file located
- move files searched in step 1 folder "f1" created in step 2
ideally, batch file should execute parent folder , should complete 3 steps in subfolders @ least till 3 levels down parent folder.
thanks in advance help.
i tried , came this. works, raw. needs run manually inside of each folder (100's of them)
mkdir f1 mkdir f2 500 move *_f1*.* f1 move *_f2*.* f2 enddo
try :
@echo off /f "delims=" %%a in ('dir /s/b/a-d *.* ^| find /i "_f1"') ( if not exist "%%~dpaf1" md "%%~dpaf1" move "%%~fa" "%%~dpaf1")
Comments
Post a Comment