
DOS Batch Scripting
Started by
PC Genie
, May 02 2013 05:20 PM
#1
Posted 02 May 2013 - 05:20 PM

#2
Posted 03 May 2013 - 06:45 AM

Hi,
Can you post the batch file please?
I will say it could be possible but it depends on the way you use to backup the registry...
Can you post the batch file please?
I will say it could be possible but it depends on the way you use to backup the registry...
#3
Posted 03 May 2013 - 08:28 AM

Thanks for your reply. Here is the rough draft of my code.
@echo off color 1f @echo. @echo Now Backing up the Registry. @echo Please Stand by... set datetimestamp=%year%%month%%day%%hour%%minute%%second% cd C:\Users\Public\RegistryBackup regedit /e "registry-backup.reg" cls color 2f @echo. @echo Done!!! @echo A copy of the Registry has been saved to the designated folder. pause
Hi,
Can you post the batch file please?
I will say it could be possible but it depends on the way you use to backup the registry...
#4
Posted 03 May 2013 - 09:00 AM

Hi,
Doing a Registry Backup like that isn't a very good backup because the regedit export can fail exporting certain keys or generate a .reg file with errors that make the import to fail.
If you want to have an 100% good registry backup I would recommend you the use of this free program Tweaking.com - Registry Backup
By default the program will create a backup in the folder you choose and every registry backup will be places on a folder with the date and time.
The program can by run automatically without any user input passing the switch /SILENT to the main exe file.
Hope this helps.
Doing a Registry Backup like that isn't a very good backup because the regedit export can fail exporting certain keys or generate a .reg file with errors that make the import to fail.
If you want to have an 100% good registry backup I would recommend you the use of this free program Tweaking.com - Registry Backup
By default the program will create a backup in the folder you choose and every registry backup will be places on a folder with the date and time.
The program can by run automatically without any user input passing the switch /SILENT to the main exe file.
Hope this helps.
#5
Posted 03 May 2013 - 05:46 PM

That's great. It look like it backs up much more than the registry, so probably that's best. Thanks very much.
I'm still curious, though, about creating a folder with a date stamp. This could come in handy in the future for some other uses that I have. Since we're on the subject of DOS Batch Scripts, could you show me how to do that? Thanks.
I'm still curious, though, about creating a folder with a date stamp. This could come in handy in the future for some other uses that I have. Since we're on the subject of DOS Batch Scripts, could you show me how to do that? Thanks.
#6
Posted 04 May 2013 - 04:25 AM

Hi,
Ok I will show you an example that you should be able to adapt to your needs...
Ok I will show you an example that you should be able to adapt to your needs...
@echo off setlocal echo Date: %date% echo Time: %time% echo. :: cut time to only HH:MM:SS set _TIME=%time:~0,8% :: replace ':' by '_' because ':' isn't valid in file/folder names set _TIME=%_TIME::=_% echo %date% echo %_TIME%
Similar Topics
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
As Featured On:






