Skip to main content

ATI possible to do command line in bat file to backup a folder?

Thread needs solution

ATI possible to do command line in bat file to backup a folder?

How best to do this?

I want to back up a firefox profile folder occasionally or daily or something.

Thanks!!!

0 Users found this helpful

Why do you think you need to use a CMD file, when you can do files and folders only backup with True Image?

What version and build of TI are you using?

Colin B wrote:

Why do you think you need to use a CMD file, when you can do files and folders only backup with True Image?

What version and build of TI are you using?

Thanks for looking in!

TI 2010 7154

I put firefox cache and active profile on a ramdisk.
On startup, I copy the profile from X to the ramdisk.
Each time I shut down, I delete that profile on x and copy the current one back from the ramdisk for next time.
I wanted to also back up a chain of those profiles to another area.
I wondered if Acronis would help.
In the meantime, I found that I can comand-line 7-zip, and imbed the date and time into the archive, thus solving the problem.

So, for example, SHUTDOWN currently looks like
chdir\
C:
cd "program files\7-zip"
7z a -tzip J:\Zrdarchive\"profile-%date:~4,2%-%date:~7,2%-@-%time:~0,2%-%time:~3,2%".zip J:\Zramdisk\
pause
rmdir J:\Zramdisk\ /S /Q
pause
xcopy T:\Profiles\*.* J:\Zramdisk\ /E /C /F /G /H /K /Y /V
pause
C:\Windows\System32\shutdown.exe -s -t 01

where J:\Zramdisk holds the profile between sessions,
J:\Zrdarchive holds the archived profiles, and
T is the ramdisk.

So it's all done with bat files, thus I needed a command line op.

All the "pause"s are in there as I'm still testing it.

I also needed to save subsequent saves in the same place with an automatically changing name. It was absolute hell finding out how to imbed the date and time into the file name, but there it is.

So, I think, problem solved! Thanks again!