SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
If file exists send mail and move file

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
If file exists send mail and move file
Author Message
Zyon



Joined: 04 Jul 2001
Posts: 1

Post If file exists send mail and move file Reply with quote

Hi there,

I'd like to check a directory and be notified by e-mail if a file exists in this directory. After sending the e-mail message I want the file that has been found to be moved to a subfolder in the same directory. Example.

Check C:\data\xml\ for files named like "translog*.dat.x_error" (ofcource without the quotes).
If this file exists, send an e-mail to administrator@ntadmin.com, using MS Exchange with the subject 'Error importing xml data!'. Then emediatly after sending the e-mail move the file that has been found to C:\data\xml\error\.
If this file does not exist do nothing.

I'd like to schedule this job, so it does not have to loop constantly.

Thanx in advance!

Regards,

Zyon

Wed Jul 04, 2001 3:56 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: If file exists send mail and move file Reply with quote

It is definetelly doable. Please see examples available in the on-line help for DirWaitForUpdate, MailSend and FileMove.

You can also use regular file-watch jobs that check for files every x minutes or seconds. File watch jobs can also monitor files using file masks like "translog*.dat.x_error"

: Hi there,

: I'd like to check a directory and be notified by e-mail if a file exists in
: this directory. After sending the e-mail message I want the file that has
: been found to be moved to a subfolder in the same directory. Example.

: Check C:\data\xml\ for files named like "translog*.dat.x_error"
: (ofcource without the quotes).
: If this file exists, send an e-mail to administrator@ntadmin.com, using MS
: Exchange with the subject 'Error importing xml data!'. Then emediatly
: after sending the e-mail move the file that has been found to
: C:\data\xml\error\.
: If this file does not exist do nothing.

: I'd like to schedule this job, so it does not have to loop constantly.

: Thanx in advance!

: Regards,

: Zyon

Wed Jul 04, 2001 9:36 am 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.