It was not auto directed your files. You have to necessary took your backup then save it manually. So you can get it easily and also as same position. I hope that It would be helpful for it.
reojohn285: I am not understanding your question. What is your problem with this?
Hrm, wait, is your problem that the backups are placed in a zip file? The actual intent behind that is to save some space for you, as without zipping the files up, the backup could be many times bigger, and then you *might* run into space issues, considering the idea of running the backups multiple times a day, for multiple days a year.
Now, I guess that you refer to the fact that the backups get zipped up, and you prefer to just have the files backed up, but not zipped up? In this case, I think a suitable modification would be to calculate the date and time stamp, and place that into a variable (already included in the batch file), and use that variable to "make a folder" by that variable name. After you make that folder, you can then copy your backup files into it. In this way, you do not have to worry about dealing with a zip file, if that bothers you .... but browsing a zip isn't that much more difficult than browsing a folder... Windows XP and Windows 7 include native support for zip files, so you can use those to view and inspect the .zip files, all day long.
This isn't that much of an issue, but I have a pre-laid out plan, for dealing with taking files from .zip , to .old, to .archive, to handle file archival ... but I think it requires a bit more thought, as to how to handle the folder re-naming, as folder's aren't usually named with file extensions, but I think I could possibly do that, to handle that for folders also, but I feel it might somehow get more clumsy, as the .zip gives you the ability to use a single file, and keep all of the saves within it ... a lot more compact, when you possibly additionally email the output ... which is also available.
Heck, I even think that I can address your issue now, come to think of it.
1. declare "date_time" variable
2. create folder by the "date_time" name
3. copy your backup files to that folder
4. zip up that entire folder
5. move the zip to another location
6. do not delete your "date_time" folder
7. now, we have a scenario that suits your wish (hopefully) and still suits mine, also.
is that what you're looking for?
i guess that people might want one or the other ... but without understanding your concern in a bit more detail ... i have no idea what you really want. i am grasping at straws here, as your statement was a bit incoherent, to put it lightly.
Please respond, so that I can properly address your issue.
To further explain myself ...
The idea here is that you make a command-line based script for something that you do manually. So, you then "schedule" the task for performing this backup, using the task scheduler included with your windows xp or windows 7 computer. Now, you could just double-click the .bat file, but you haven't necessarily made your life any easier, as the backup depends upon manual intervention, and the reason I use computers is as a machine to make life easier. Don't get me wrong, I really like automating tasks to make them occur faster, and/or with less input/error from me, but what I most prefer is scheduling tasks that I have automated, so that they can then occur effortlessly and automatically in the future. Seriously, I am able to have this script run periodically, *while* I am even playing the game!
The zipped files are date and time stamped, so, if you did some major goof-up at some point, you can go back and get that particular save game file from prior to that time, and restore it, and resume playing from that point. The more paranoid you are, the more often you can have the backups occur.
This script is flexible, as you can modify it, and adapt it to "any" PC data available. Why do I assert that? I include variables, so that you can easily modify the save locations, to suit your situation, and your computer. One thing you'll notice is that the user directory location was placed in quotes, as I was attempting to offer the flexibility to address Windows XP style directories, where the "Documents and Settings" and "Application Data" directories usually have a space in them ...which is actually poor design to anyone who has to actually work on this stuff, and Microsoft must have agreed, to have gone back to the "users" and "AppData" folder names, that do not include spaces. So, I guess an additional tip is that if you have spaces in your folder names (not recommended), to please enclose them in quotation marks.
For example:
- Code: Select all
set driveletterc=c
set driveletterd=d
set backupdir=d:\backup\nba2k10
set logdir=d:\backup\nba2k10\log
set savedir="C:\Users\Owner\AppData\Roaming\2K Sports\NBA 2K10\Saves\"
set scriptdir=c:\scripts\nba2k10
set workingdir=d:\backup\working
set backupfile=backup.zip
set logfile=backuplog.txt
set zipper=7za.exe
set ext01=cfg
set ext02=LSF
set ext03=PPF
set ext04=REC
set ext05=ROS
set ext06=SLD
set ext07=STG
set ext08=USR
set ext09=fdc
set ext10=CMG
%driveletterc%:
xcopy %savedir%\*.* %workingdir% /C /Y /F > %scriptdir%\%logfile%
%driveletterd%:
cd %workingdir% >> %scriptdir%\%logfile%
xcopy %scriptdir%\%zipper% %workingdir% /C /Y /F >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext01% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext02% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext03% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext04% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext05% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext06% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext07% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext08% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext09% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext10% >> %scriptdir%\%logfile%
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set CURDATE=%%B%%C%%D
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set CURTIME=%%a%%b%%c
rename %workingdir%\%backupfile% %CURDATE%_%CURTIME%_%backupfile% >> %scriptdir%\%logfile%
%zipper% l %CURDATE%_%CURTIME%_%backupfile% >> %scriptdir%\%logfile%
copy %CURDATE%_%CURTIME%_%backupfile% %backupdir% >> %scriptdir%\%logfile%
%driveletterd%:
cd %workingdir%
del %workingdir%\%zipper%
del %workingdir%\*.%ext01%
del %workingdir%\*.%ext02%
del %workingdir%\*.%ext03%
del %workingdir%\*.%ext04%
del %workingdir%\*.%ext05%
del %workingdir%\*.%ext06%
del %workingdir%\*.%ext07%
del %workingdir%\*.%ext08%
del %workingdir%\*.%ext09%
del %workingdir%\*.%ext10%
del %workingdir%\%CURDATE%_%CURTIME%_%backupfile%
%driveletterc%:
cd %scriptdir%
rename %logfile% %CURDATE%_%CURTIME%_%logfile%
copy %CURDATE%_%CURTIME%_%logfile% %logdir%
del %scriptdir%\%CURDATE%_%CURTIME%_%logfile%
As you can see, you can easily modify whatever location suits *your* games, and then use that to backup your game saves. Don't have a drive C and a drive D? or another drive, simply modify the script at the one initial location. The one thing I sort of fail you on is that the zipping commands actually depend upon having 7zip (which is included, but you aren't free to substitute another zipper program). However, sinze 7-zip is freely distributable, I have included it with the backup script.
Remember, the flexibility here is that you can adapt this to OTHER games. Moreso than that, you can adapt this to other "precious save files" on your computer, and back them up to another location.
It was not auto directed your files. You have to necessary took your backup then save it manually. So you can get it easily and also as same position. I hope that It would be helpful for it.
reojohn285: I am not understanding your question. What is your problem with this?
Hrm, wait, is your problem that the backups are placed in a zip file? The actual intent behind that is to save some space for you, as without zipping the files up, the backup could be many times bigger, and then you *might* run into space issues, considering the idea of running the backups multiple times a day, for multiple days a year.
Now, I guess that you refer to the fact that the backups get zipped up, and you prefer to just have the files backed up, but not zipped up? In this case, I think a suitable modification would be to calculate the date and time stamp, and place that into a variable (already included in the batch file), and use that variable to "make a folder" by that variable name. After you make that folder, you can then copy your backup files into it. In this way, you do not have to worry about dealing with a zip file, if that bothers you .... but browsing a zip isn't that much more difficult than browsing a folder... Windows XP and Windows 7 include native support for zip files, so you can use those to view and inspect the .zip files, all day long.
This isn't that much of an issue, but I have a pre-laid out plan, for dealing with taking files from .zip , to .old, to .archive, to handle file archival ... but I think it requires a bit more thought, as to how to handle the folder re-naming, as folder's aren't usually named with file extensions, but I think I could possibly do that, to handle that for folders also, but I feel it might somehow get more clumsy, as the .zip gives you the ability to use a single file, and keep all of the saves within it ... a lot more compact, when you possibly additionally email the output ... which is also available.
Heck, I even think that I can address your issue now, come to think of it.
1. declare "date_time" variable
2. create folder by the "date_time" name
3. copy your backup files to that folder
4. zip up that entire folder
5. move the zip to another location
6. do not delete your "date_time" folder
7. now, we have a scenario that suits your wish (hopefully) and still suits mine, also.
is that what you're looking for?
i guess that people might want one or the other ... but without understanding your concern in a bit more detail ... i have no idea what you really want. i am grasping at straws here, as your statement was a bit incoherent, to put it lightly.
Please respond, so that I can properly address your issue.
To further explain myself ...
The idea here is that you make a command-line based script for something that you do manually. So, you then "schedule" the task for performing this backup, using the task scheduler included with your windows xp or windows 7 computer. Now, you could just double-click the .bat file, but you haven't necessarily made your life any easier, as the backup depends upon manual intervention, and the reason I use computers is as a machine to make life easier. Don't get me wrong, I really like automating tasks to make them occur faster, and/or with less input/error from me, but what I most prefer is scheduling tasks that I have automated, so that they can then occur effortlessly and automatically in the future. Seriously, I am able to have this script run periodically, *while* I am even playing the game!
The zipped files are date and time stamped, so, if you did some major goof-up at some point, you can go back and get that particular save game file from prior to that time, and restore it, and resume playing from that point. The more paranoid you are, the more often you can have the backups occur.
This script is flexible, as you can modify it, and adapt it to "any" PC data available. Why do I assert that? I include variables, so that you can easily modify the save locations, to suit your situation, and your computer. One thing you'll notice is that the user directory location was placed in quotes, as I was attempting to offer the flexibility to address Windows XP style directories, where the "Documents and Settings" and "Application Data" directories usually have a space in them ...which is actually poor design to anyone who has to actually work on this stuff, and Microsoft must have agreed, to have gone back to the "users" and "AppData" folder names, that do not include spaces. So, I guess an additional tip is that if you have spaces in your folder names (not recommended), to please enclose them in quotation marks.
For example:
- Code: Select all
set driveletterc=c
set driveletterd=d
set backupdir=d:\backup\nba2k10
set logdir=d:\backup\nba2k10\log
set savedir="C:\Users\Owner\AppData\Roaming\2K Sports\NBA 2K10\Saves\"
set scriptdir=c:\scripts\nba2k10
set workingdir=d:\backup\working
set backupfile=backup.zip
set logfile=backuplog.txt
set zipper=7za.exe
set ext01=cfg
set ext02=LSF
set ext03=PPF
set ext04=REC
set ext05=ROS
set ext06=SLD
set ext07=STG
set ext08=USR
set ext09=fdc
set ext10=CMG
%driveletterc%:
xcopy %savedir%\*.* %workingdir% /C /Y /F > %scriptdir%\%logfile%
%driveletterd%:
cd %workingdir% >> %scriptdir%\%logfile%
xcopy %scriptdir%\%zipper% %workingdir% /C /Y /F >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext01% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext02% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext03% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext04% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext05% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext06% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext07% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext08% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext09% >> %scriptdir%\%logfile%
%zipper% a -tzip %backupfile% *.%ext10% >> %scriptdir%\%logfile%
for /F "tokens=1-4 delims=/- " %%A in ('date/T') do set CURDATE=%%B%%C%%D
for /F "tokens=1-4 delims=:., " %%a in ('time/T') do set CURTIME=%%a%%b%%c
rename %workingdir%\%backupfile% %CURDATE%_%CURTIME%_%backupfile% >> %scriptdir%\%logfile%
%zipper% l %CURDATE%_%CURTIME%_%backupfile% >> %scriptdir%\%logfile%
copy %CURDATE%_%CURTIME%_%backupfile% %backupdir% >> %scriptdir%\%logfile%
%driveletterd%:
cd %workingdir%
del %workingdir%\%zipper%
del %workingdir%\*.%ext01%
del %workingdir%\*.%ext02%
del %workingdir%\*.%ext03%
del %workingdir%\*.%ext04%
del %workingdir%\*.%ext05%
del %workingdir%\*.%ext06%
del %workingdir%\*.%ext07%
del %workingdir%\*.%ext08%
del %workingdir%\*.%ext09%
del %workingdir%\*.%ext10%
del %workingdir%\%CURDATE%_%CURTIME%_%backupfile%
%driveletterc%:
cd %scriptdir%
rename %logfile% %CURDATE%_%CURTIME%_%logfile%
copy %CURDATE%_%CURTIME%_%logfile% %logdir%
del %scriptdir%\%CURDATE%_%CURTIME%_%logfile%
As you can see, you can easily modify whatever location suits *your* games, and then use that to backup your game saves. Don't have a drive C and a drive D? or another drive, simply modify the script at the one initial location. The one thing I sort of fail you on is that the zipping commands actually depend upon having 7zip (which is included, but you aren't free to substitute another zipper program. Actually, you are, but you'd have to modify the accompanying commands, which I would not have documentation for, and/or necessarily be able to assist you with). However, sinze 7-zip is freely distributable, I have included it with the backup script.
Remember, the flexibility here is that you can adapt this to OTHER games. Moreso than that, you can adapt this to other "precious save files" on your computer, and back them up to another location. There is nothing saying that "ext01" can't be something else, or "ext02" or "ext03", etc.
As an example, you might want to save your .DOC, .DOCX, .PPT, .PPTX, .PDF, etc. files somewhere automatically on schedule? Then, simple, modify this script, to fit your needs.
EXAMPLE:
- Code: Select all
set backupdir="d:\backup\myworkfiles"
set logdir="d:\backup\myworkfiles\log"
set savedir="C:\documents and settings\reojohn285\My Documents"
set scriptdir="c:\scripts\myworkfiles"
set workingdir="d:\backup\working"
set ext01=doc
set ext02=docx
set ext03=ppt
set ext04=pptx
set ext05=xls
set ext06=xlsx
Also, I intentionally specify to copy these files to different drives, even including those in the paths used above, as an important point is to save the files to different drives.
I would think that if someone did have questions, they might want a bit more clarification on how to schedule a task in Windows XP or Windows 7 (Don't have other operating systems to test with right now, but this information is available on the net to reference). Or, another question might be, how do I set up the archiving job?
OK, please feel free to submit further questions.
And the original idea for this? I do this commonly for stuff at work (maybe a little more elaborate, and/or also including command-line mailers to email myself when the thing completes, attaching the log file or something, so that I have something to read over .... but that's about it.)
OK, please feel free to submit further questions.
Thanks.
I came, I saw, but I did not conquer.