CPUG

The Check Point User Group

A Resource For The Check Point Community.  Fast.  Useful.  Independent.

1. CCSA/CCSE One-Week Dual-Certification Training Course with CPUG in San Francisco!
    Courses Starting 12/8, (2009) 1/19, 2/9, 3/9, 4/6, 5/4, 6/8, 7/6, 8/3.
2. Join Us On LinkedIn - We now have a CPUG group.


Go Back   CPUG: The Check Point User Group > Check Point Firewall-1/VPN-1 And Related Products > Disaster Recovery
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-08-22
Member
 
Join Date: 2005-08-22
Posts: 54
Rep Power: 4
karimi has an average reputation (10+)
Default upgrade_export - file already exists scripting problem

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
Reply With Quote
  #2 (permalink)  
Old 2006-08-24
Senior Member
 
Join Date: 2006-07-10
Posts: 164
Rep Power: 3
Porter has an average reputation (10+)
Default Re: upgrade_export - file already exists scripting problem

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
Reply With Quote
  #3 (permalink)  
Old 2006-08-24
Junior Member
 
Join Date: 2006-08-24
Posts: 1
Rep Power: 0
Andreas1973 has an average reputation (10+)
Default Re: upgrade_export - file already exists scripting problem

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!
Reply With Quote
  #4 (permalink)  
Old 2006-09-01
Member
 
Join Date: 2005-08-22
Posts: 54
Rep Power: 4
karimi has an average reputation (10+)
Default Re: upgrade_export - file already exists scripting problem

Thanks everyone!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 06:53.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0