SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Creating Backups

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Creating Backups
Author Message
Kory



Joined: 05 Jul 2002
Posts: 5

Post Creating Backups Reply with quote

How can I tell 24/7 to make a copy of a given file and when doing so create a folder name with today's date?

Fri Aug 30, 2002 10:00 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Re: Creating Backups Reply with quote

Here is a fragment of the example script from DirCreate topic from the on-line help

Dim( dir_name, string, "c:\\my_files\\@T"mm-dd-yyyy"" )
DirCreate( dir_name )
FileCopyEx( "c:\\my_files\\*.xls", dir_name )

: How can I tell 24/7 to make a copy of a given file and when doing so create a
: folder name with today's date?

Fri Aug 30, 2002 10:10 am View user's profile Send private message
Kory



Joined: 05 Jul 2002
Posts: 5

Post Re: Creating Backups Reply with quote

Here is the script I have but it is causing an error

Dim( dir_name, string, "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
DirCreate( dir_name )
FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name )

: Here is a fragment of the example script from DirCreate topic from the
: on-line help

: Dim( dir_name, string, "c:\\my_files\\@T"mm-dd-yyyy"" )
: DirCreate( dir_name )
: FileCopyEx( "c:\\my_files\\*.xls", dir_name )

Fri Aug 30, 2002 12:21 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7952

Post Re: Creating Backups Reply with quote

FileCopyEx requires 3 parameters.

Dim( dir_name, string, "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
Dim( count, number )
DirCreate( dir_name )
FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name, count )

It is also also a good idea to have the job check for existance of the destination directory and create it only if it does not exist. This would allow to re-run be re-run without errors. Here is an example:

Dim( dir_name, string, "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
Dim( count, number )
Dim( do_not_create, boolean )

DirExists( dir_name, do_not_create )
IfThen( do_not_create, COPY_FILE )
DirCreate( dir_name )
COPY_FILE:
FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name, count )

: Here is the script I have but it is causing an error

: Dim( dir_name, string,
: "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
: DirCreate( dir_name )
: FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name )

Fri Aug 30, 2002 12:32 pm View user's profile Send private message
Kory



Joined: 05 Jul 2002
Posts: 5

Post Re: Creating Backups Reply with quote

Its giving an error saying keyword not found line 5

Dim( dir_name, string, "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
Dim( count, number )
Dim( do_not_create, boolean )

DirExists( dir_name, do_not_create )
IfThen( do_not_create, COPY_FILE )
DirCreate( dir_name )
COPY_FILE:
FileCopyEx( "F:\\MLS\\site\\db\\*.mdb", dir_name, count )

: FileCopyEx requires 3 parameters.

: Dim( dir_name, string,
: "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
: Dim( count, number )
: DirCreate( dir_name )
: FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name, count )

: It is also also a good idea to have the job check for existance of the
: destination directory and create it only if it does not exist. This would
: allow to re-run be re-run without errors. Here is an example: Dim(
: dir_name, string,
: "F:\\MLS\\site\\db\\backup\\@T"mm-dd-yyyy"" )
: Dim( count, number )
: Dim( do_not_create, boolean )

: DirExists( dir_name, do_not_create )
: IfThen( do_not_create, COPY_FILE )
: DirCreate( dir_name )
: COPY_FILE: FileCopyEx( "F:\\MLS\\site\\db\\mls_db.mdb", dir_name,
: count )

Fri Aug 30, 2002 12:59 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.