SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
DirWaitForUpdate & FileCopyEx

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
DirWaitForUpdate & FileCopyEx
Author Message
James



Joined: 19 Apr 2004
Posts: 4

Post DirWaitForUpdate & FileCopyEx Reply with quote

This does not seem to work at all.
If there is ANY change what so ever within "AIM Logs" directory, including the subfolders I would like a copy of the entire "AIM Logs" to be copied to another directory. I am unable to name the subfolders in the search because new names might be added and I wouldn't be able to keep track of it all that way.
This is what I have as a script on an XP computer SP2 computer.

Dim change_found, boolean
Dim( count, number )

START:
DirWaitForUpdate "C:\\Documents and Settings\\Owner\\My Documents\\AIM Logs\\", 0, change_found

// OK, some change is found
// Let's wait 5 seconds, just in case if the change is not completed yet
Wait 5

// Copy all data files from data directory to the backup directory
FileCopyEx( "C:\\Documents and Settings\\Owner\\My Documents\\AIM Logs\\*.*", "c:\\downloads", count )

// start watching again
GoTo START

Tue Dec 27, 2005 9:08 pm View user's profile Send private message
James



Joined: 19 Apr 2004
Posts: 4

Post Re: DirWaitForUpdate & FileCopyEx Reply with quote

Forgot to mention that I have it set to run all day every 1 minute.

Tue Dec 27, 2005 9:15 pm View user's profile Send private message
James



Joined: 19 Apr 2004
Posts: 4

Post Re: DirWaitForUpdate & FileCopyEx Reply with quote

After further exploration I came up with this

SyncLocalDir( "C:\\Documents and Settings\\Owner\\My Documents\\AIM Logs", &

"c:\\downloads", &

True, False, True, True )

which I ran BEFORE figuring out that where I had 4 trues, i needed the above set up because it erased the enite contents of my downloads directory....
Sadly this does not even do what I would need based on the fact that DirWaitForUpdate will not look in the dirs to see if there are any changes.
Test by copying a few files inside one of the log dirs and nothing happened.
Am I missing something? or does this product simply not search inside directories?

Tue Dec 27, 2005 10:36 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: DirWaitForUpdate & FileCopyEx Reply with quote

1. DirWaitForUpdate will not monitor subfolders. You will need a separate monitoring job for each subfolder or event better use the 24x7 Event Server wich is capble to monitor folders and subfolders in one event
2. If using DirWaitForUpdate do not run the job every minute. The job should be set to start in 24x7 startup and DirWaitForUpdate should be called repetadly inside end-less loop. Don't be afraid of end-less loop in this case. It isn ot going to spin all the time. DirWaitForUpdate will cause it to sleep until next directory change.

: Forgot to mention that I have it set to run all day every 1 minute.

Tue Dec 27, 2005 10:47 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: DirWaitForUpdate & FileCopyEx Reply with quote

Yes, you are. Please see my previous post.

Again, use the 24x7 Event Server if there lots of subfolders. One event setup in the event server can do all of them and the event can be set to invoke the 24x7 Scheduler job doing "SyncLocalDir"

: After further exploration I came up with this

: SyncLocalDir( "C:\\Documents and Settings\\Owner\\My Documents\\AIM
: Logs", &

: "c:\\downloads", &

: True, False, True, True )

: which I ran BEFORE figuring out that where I had 4 trues, i needed the above
: set up because it erased the enite contents of my downloads directory....
: Sadly this does not even do what I would need based on the fact that
: DirWaitForUpdate will not look in the dirs to see if there are any
: changes.
: Test by copying a few files inside one of the log dirs and nothing happened.
: Am I missing something? or does this product simply not search inside
: directories?

Tue Dec 27, 2005 10:49 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.