Page 1 of 1
back file to zip via batch file
Posted: 09 Aug 2022 10:42
by Nokin3
I would like to backup file via zip. (before I use robocopy it use many hdd)
How could I make the batch file for zip without error?
What compression level is safe most?
thank you very much.
Re: back file to zip via batch file
Posted: 11 Aug 2022 12:10
by Nokin3
@echo off
@title backup network drive
rem Configuration
set 7z=C:\Program Files\7-Zip\7z.exe
for /f "tokens=* delims=" %%X in ('type name-of-folder-in-network drive.txt') do 7z a "E:\%%X.zip" "%%X" | findstr /i /v "pavlov scanning compressing" > %userprofile%\Desktop\log\Foot4k\%%X.txt 2>&1
pause
---------
today I use this and I have 2files in network drive (1 name of folder,2 batfile code like this).
How I store 2 files in pc and run bat file for zip to hdd on this pc.