0

7z.exe a "C:\Temp1\%DATE:~1% %TIME:~0,5%-Backup".7z c:\temp2\ -m0=copy

This is the command im using, but it outputs to C:\temp1\2\03\2022 19 without the backup.7z

Could someone point me in the right direction pls

Stephan
  • 53,940
  • 10
  • 58
  • 91
WNG Narny
  • 13
  • 3
  • Should probably ask this on Super User instead, but this might help in the meantime: https://ss64.com/nt/syntax-replace.html – General Grievance Mar 03 '22 at 00:00
  • Do yourself a favour and don't use date/time strings that are dependent on local user settings. It can result in unexpected and/or script-breaking results. Better use a [locale-independent method](https://stackoverflow.com/questions/7727114/batch-command-date-and-time-in-file-name) – Stephan Mar 03 '22 at 14:29
  • [here is a nice collection of some more methods](https://stackoverflow.com/a/19799236/2152082) – Stephan Mar 05 '22 at 09:38

0 Answers0