kdub87 Posted November 13, 2020 Share Posted November 13, 2020 (edited) I have a batch file that will go through current directory and compress all files into 7z format. Works great. But it will not go through Sub Directories. Can anyone help me get it to go through Sub Directories and output the 7z files into their proper sub directories as needed? The Batch: @ECHO OFF FOR %%i IN (*.*) DO ( ECHO "%%i" | FIND /I "zip.bat" 1>NUL) || ( "Y:\7Zip\7-Zip\7z.exe" a -t7z -mx9 "%%~ni.7z" "%%i" ) ) --UPDATE-- A friend of mine figured it out. Use this to quickly zip up your rom library while maintaining existing folder structure. Then simply open your database xml in something like Notepad++, do a Find All for w/e file extension you were using before (example .iso) and Replace All with .7z. Good for quickly compressing thousands of ROMs that you have already downloaded and imported into LaunchBox. for /r %%F in (*) do "Y:\7Zip\7-Zip\7z.exe" a -t7z -mx9 "%%~dpnF" "%%F" Edited November 13, 2020 by kdub87 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.