| CPUG | |
| The Check Point User Group | |
| A Resource For The Check Point Community. Fast. Useful. Independent. | |
|
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Hello, i'm using the following batch file on Windows to backup the smartcenter: # upgrade_export E:\Backups\YRP_Firewall_Backups\YRP_Backup < cr.txt # However, since a backup file already exists, upgrade_export runs, it will say: The target export file already exists. Do you want to override it? (y/n) [n] ? How can I script it such that it sends a "-y" overwrite option, or can I use a $DATE flag like UNIX? Don't know how to do this in Windows! Thanks!! ~m |
| |||
| create a "makro" with texteditor -> makro.mak and enter needed value -> Y for Yes or N for No, what ever run your command e.g. copy test.txt test.txt < makro.mak Overwrite test.txt? (Yes/No/All): Y 1 file(s) copied. hope it helps! __________________ misery is optional |
| |||
| For date flag in windows u can use: for /F %%i in ('time /t') do set ZEIT=%%i for /F "tokens=1,2,* delims=:" %%i in ('echo %zeit%') do set OZeit=%%i%%j for /F %%i in ('date /t') do set DATUM=%%i for /F "tokens=1,2,* delims=." %%i in ('echo %datum%') do set RDATUM=%%k%%j%%i This is working with German settings. With english time output on command line you may have to change it a little bit... Hope it helps! |
![]() |
| Thread Tools | |
| Display Modes | |
| |