hello I have made a script to make a copy of a specific folder:
set LOG="J:\Backups\Logfile %Date%.txt"
echo Backup vom: %Date%, %Time% >> %LOG%
echo shop.7z wird aktualisiert >>%LOG%
%RUN7% u "J:\Backups\shop.7z" "D:\apachefriends\xampp\htdocs\shop" >>%LOG%
7z dont write to my logfile in J:\Backups\Logfile %Date%.txt, why?
It's an interesting question, I had the same but didn't take the time to ask...
That might help, I personally haven't tried.
it works, but it remove my lines (echo shop.7z wird aktualisiert >>%LOG%)
you must put >> and not > to append the file
7-Zip writes all it's output (info and error) to the standard error output (stderr), so you should use 2>>%LOG%
This is because 7-Zip can compress from standard input and extract to standard output (the -si and -so command line parameters). So to avoid problems, all the informative output is done to the standard error output (stderr)
Log in to post a comment.