Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Today I lost my whole Far Cry 3 save game suddenly. So now I want to backup it's save game folder automatically on a certain period of time using windows task scheduling.

I want to include date and time in archive file name.
Here is my command

C:\>"C:\Program Files\7-Zip\7z" a -r "D:\FC3\%DATE:~7,2%.%DATE:~4,2%.%DATE:~-4% %TIME% Backup".7z  "C:\ProgramData\Orbit\46"

For formatting purpose, I followed this question on superuser

I am getting log when executing this command

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
Scanning

Creating archive D:\FC3\24.02.2013 17:52:10.62 Backup.7z


Error:
7-Zip cannot open file
D:\FC3\24.02.2013 17:52:10.62 Backup.7z
The filename, directory name, or volume label syntax is incorrect.



System error:
Unspecified error

If I use a simple file name like "D:\abc". It would work.

Please help. Where I am going wrong..?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Here's a way to generate a timestamp filename.

echo creating "D:\FC3\%DATE:/=.%%TIME::=.% Backup.7z"

Sample Output:

creating "D:\FC3\02.24.2013 7.34.45.85 Backup.7z"
share|improve this answer
    
well any way my FC3 savegame corrupted file just worked after a system restart. I am very happy. But still backing up this. Can u pls help me in this superuser.com/q/556681/142866 –  Shashwat Tripathi Feb 24 '13 at 16:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.