Skip to content

Instantly share code, notes, and snippets.

@moshest
Created April 23, 2017 08:43
Show Gist options
  • Save moshest/2b5f4c12b41149eb3abdd8ceffd9b553 to your computer and use it in GitHub Desktop.
Save moshest/2b5f4c12b41149eb3abdd8ceffd9b553 to your computer and use it in GitHub Desktop.
Split S1 .Mov files to folders
@echo off
set found=0
setlocal enabledelayedexpansion
for /L %%a in (start,1,9999) do (
set "num=%%a"
set "num=!num:~-4!"
if exist "ZCAM!num!_*.MOV" (
set found=1
echo "Create and move files to folder '%%num'"
md "!num!" 2>nul
move "ZCAM!num!_*.MOV" "!num!"
) else (
if found == 1 (goto :break)
)
)
:break
echo "Done."
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment