I altered the code as you suggested so I had the following code: @echo off setlocal enableextensions title Create 7z backup archives rem Correct 7-Zip path if needed REM set 7zpth=%path%;"C:\PROGRA~1\7-ZIP"; set 7zpth=%path%;"C:\PROGRA~1\DISK-F~1\7-ZIP" rem Correct targef folder as Your needed REM set targ=D:\Back\%USERNAME% set targ=D:\System rem Correct archive name if needed set arcname="LibreOffice Installed Profile" rem path to LibreOffice profile set src="%APPDATA%\LibreOffice\4\user" if "%1"...
Here are the results. Note the current short-date on my system is Wed 12 Feb 2025
echo "%date%" "Wed 12 Feb 2025" P.S. I would want the date prepended to the file to be (for example) 2025-02-12 - LibreOffice Installed Profile.7z
echo "%date%" "Wed 12 Feb 2025" P.S. I would want the date prepended to the file to be (for example) 2025-02-12
echo "%date%" "Wed 12 Feb 2025"
I tried setting the path to: set path = C:\PROGRA~1\DISK-F~1\7-ZIP;%path%; That didn't work, I got the same error. Then I copied 7z.exe and 7z.dll to Windows folder and it worked, after a fashion. The generated .7z archive title is all wrong. I am deeply grateful for the time and effort you have put in on this but if I have to add files into the Windows folder then I don't think I want to pursue this further.
I don't understand your instruction — I am not a coder of any kind. The path to 7-Zip is absolutely correct. In the file you provided, and trying to follow your instructions, I put: set path = "C:\Program Files\DISK-FILE\7-Zip\";%path%; 7z.exe + 7z.dll But this does not work. Could you give the precise example please?
Now getting this error. See attached screenshot.