Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
Last active April 28, 2023 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattiasghodsian/b6c051abbaccee4e5929ac2453ffedaf to your computer and use it in GitHub Desktop.
Save mattiasghodsian/b6c051abbaccee4e5929ac2453ffedaf to your computer and use it in GitHub Desktop.
UnRAR/UnZip files in sub directory's + rename + move
::Title: UnRAR/UnZip files in sub directory's + rename + move
::Author: Mattias Ghodsian
::Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
::Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
SETLOCAL ENABLEEXTENSIONS
FOR /D /r %%F in ("*") DO (
pushd %CD%
cd %%F
FOR %%X in (*.rar *.zip) DO (
"C:\Program Files\7-zip\7z.exe" x "%%X" -y
)
FOR %%X in (*.avi) DO (
ren %%X "%%~nxF .avi"
)
FOR %%X in (*.avi) DO (
move "%%X" "Z:\folder\"
)
popd
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment