windows - How to merge these codes, and move certain files instead of all files to a folder? -
the following code makes in each folder, placed in same directory code located, folder named "video_ts".
for /f "delims=|" %%i in ('dir /a:d /b') mkdir "%%i"\video_ts
like this:
d:\movies
---------------\bikini spring break
-----------------------------------------\p2hbsb5.jpg
-----------------------------------------\vts_01_1.vob
-----------------------------------------\vts_02_0.bup
-----------------------------------------\vts_02_0.ifo
-----------------------------------------\video_ts
----------------\breaking girls
----------------------------------------\pdnydtd.png
----------------------------------------\vts_02_1.vob
----------------------------------------\vts_03_0.bup
----------------------------------------\vts_06_0.ifo
----------------------------------------\video_ts
and following code puts files in each folder in it's "video_ts" folder.
for /f "delims=|" %%i in ('dir /a:d /b') move "%%i"\*.* "%%i"\video_ts
my intention add both codes together. , instead of files placed in "video_ts" folder, following files in folder should moved "video_ts" folder: ".ifo", ".bup", , ".vob".
want achieve this:
d:\movies
---------------\bikini spring break
----------------------------------------\p2hbsb5.jpg
----------------------------------------\video_ts
-------------------------------------------------------\vts_01_1.vob
-------------------------------------------------------\vts_02_0.bup
-------------------------------------------------------\vts_02_0.ifo
----------------\breaking girls
-----------------------------------------\pdnydtd.png
-----------------------------------------\video_ts
--------------------------------------------------------\vts_02_1.vob
--------------------------------------------------------\vts_03_0.bup
--------------------------------------------------------\vts_06_0.ifo
this should want.
for /f "delims=|" %%i in ('dir /a:d /b') ( mkdir "%%i"\video_ts %%a in (vob bup ifo) move "%%i"\*.%%a "%%i"\video_ts )
Comments
Post a Comment