How to create sequential 7-Zip from files then delete the original once done using batch file.

Subscribers:
260
Published on ● Video Link: https://www.youtube.com/watch?v=0E6yNMG4SwA



Category:
Tutorial
Duration: 5:26
94 views
1


My 7zip batch compresses all files and then deletes the original files after compression is completed. (If you don't want to delete them, then just remove or rem out the deletion statement)

Note:
Don't forget to set .bat file properties to [READ ONLY] else It'll be a one-way trip ;)
7z.exe must be installed in its default dir (C:\Program Files\)
Study the script and choose your own source and destination path if you don't like how I've set it up. However, it worked just fine as it is, which is the reason and purpose behind this video.

**Why did I make this How-To video when there are already allot out there?**

Honestly, I can't find a tutorial that really tells me exactly how on this great age internet. Seriously. I really hate going through those how-to's written by others. It's like I can never quite get it right when following their scripts. What I really want is a video that shows me how it's done, in a way that even a layperson can understand. But I've had no luck finding one like that. So, I ended up going through a lot of trial and error to create a script that suits my specific needs for the 7-zip conversion. I am pleased with this batch file that I've created. This customized script is straight to the point for performing the 7-zip conversion according to my desired specifications.

**Copy the below script to make it into a bat file using notepad. **

========================================

set "sevenzip=C:\Program Files\7-Zip\7z.exe"
set "source=C:\Temp\[-7z Compression]"
set "destination=C:\Temp\[-7z Compression]\(USA)"

for %%F in ("%source%\*.*") do (
"%sevenzip%" a -mx9 -mmt "%destination%\%%~nF.7z" "%%F"
del "%%F"
)

pause

==============================================================================
*This modification excludes the '7z compress now.bat' file from compression, which I find annoying. It accomplishes this without the need for looping, which can consume processing time.*

(You can also substitute the name "'7z compress now.bat" with whatever you want to name your bat file.)
==============================================================================

set "sevenzip=C:\Program Files\7-Zip\7z.exe"
set "source=C:\Temp\[-7z Compression]"
set "destination=C:\Temp\[-7z Compression]\(USA)"

if exist "%source%\7z compress now.bat" (
set "excludeFile=%source%\7z compress now.bat"
) else (
set "excludeFile="
)

for %%F in ("%source%\*.*") do (
if not "%%~dpnxF"=="%excludeFile%" (
"%sevenzip%" a -mx9 -mmt "%destination%\%%~nF.7z" "%%F"
del "%%F"
)
)

pause

/- Have fun/




Other Videos By Time Is Just A Construct (TiJAC)


2023-08-18My quick play of the classic XBOX Game 'Yager' (2003) on XEMU emulator as it was updated to 0.7.111
2023-08-18How to make Launchbox into a Magazine & E-Book archiver/library to launch your pdf & cbz collection.
2023-08-16Gameplay Sega Saturn Street Fighter Alpha 2 | Retroarch LightsOut Mega Bezel shader | 5950X | 3080
2023-08-06Utah Winter Driving 2021 12-27 18:11:08
2023-07-26How to Fix Gameboy and Gameboy Color Overlay on RetroAch both using the same Gambatte Libretro Core
2023-07-25Trying out the new release version of Launchbox 13.6 for the first time w/ a handheld Gameboy emu.
2023-07-21How to manually add modern Windows Games to Launchbox | Windows 11 desktop environment | Ready2Play
2023-07-19My frustrating first attempt to install H2OGPT on my PC | AMD 5950X | Nvidia 3080
2023-07-18My step to create .chd from .iso and .bin/cue using a batch file for use in emulators
2023-07-14My Gameplay of GTI Club: Supermini Festa! (Arcade 2008) on Teknoparrot (Release update 1.0.0.1045)
2023-07-14How to create sequential 7-Zip from files then delete the original once done using batch file.
2023-07-06Gameplay Star Wars: Shadows of the Empire on RetroArch via Mupen64 (Nintendo 64 Emulator) AMD 5950X.
2023-06-28Gameplay of Sega Genesis 'Sonic the Hedgehog 2' (1992) | Ultra Realistic Mega Bezel w/ Reflection.
2023-06-28Quick Gameplay of SEGA's Sonic the Hedgehog (1991) on RetroArch using Ultra Realistic Mega Bezel.
2023-06-26Gameplay 1943: The Battle of Midway (1987) on RetroArch x15.0 using MAME libretro Core | Mega Bezel.
2023-06-26Gameplay of Nintendo 3DS Donkey Kong Country Returns 3D (2013) | RetroArch 15.0 | Orionsangel | 1080
2023-06-26Gameplay of Pac-Man arcade game (1980) on RetroArch 1.15.0 | MAME | Ultra Realistic Mega Bezel.
2023-06-26Gameplay of Pac-Mania arcade game (1987) on RetroArch 15.0 using MAME Libretro | Lights Out overlay
2023-06-26Gameplay of Nintendo arcade game, Donkey Kong (1981) on RetroArch w/ Ultra Realistic Mega Bezel.
2023-06-25Gameplay of Nintendo 3DS Pac-Man & Galaga Dimensions 'Galaga 3D Impact' on RetroArch LO Overlay.
2023-06-23Gameplay of Sega Saturn's 'Manx TT Superbike' on RetroArch, with Orionsangel overlay and MEGA Bezel.



Tags:
7-zip
7z
batch
compresses all files
zip
archive
how to
crompression script
multiple zip