SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
File watch on multiple semaphores

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
File watch on multiple semaphores
Author Message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
Hi,

When I set up a file watch job on a semaphore file (\\server\directory\files\*.jpg), the job fires fine.

It is not working when I add multiple files (\\server\directory\files\*.jpg, \\server\directory\files\*.jpeg) on the file watch.
Am I missing anything?

And also is there a way to add multiple wildcard files in the FileMoveEx. Right now I am splitting it as below.

Code:
FileMoveEx( "\\\\Server\\Directory\\files\\*.jpg", "\\\\server\\common\shared\\", vReturn )
FileMoveEx( "\\\\Server\\Directory\\files\\*.jpeg", "\\\\server\\common\shared\\", vReturn )
Thanks


Last edited by jambai on Mon Mar 18, 2013 11:22 am; edited 1 time in total
Fri Mar 15, 2013 5:37 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
\\server\directory\files\*.jpg, \\server\directory\files\*.jpeg - this seems to be correct. what's the actual file path that you are using?

As to the code sample, you are correct, FileMoveEx can only handle one file mask at a time.
Fri Mar 15, 2013 11:40 pm View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
The actual file paths are

\\fs-uc-1\TW\CP\BC-Del\*.jpg, \\fs-uc-1\TW\CP\BC-Del\*.jpeg, \\fs-uc-1\TW\CP\BC-Del\*.zip

The file watch should fire when any of the above said file types are available.

Thanks


Last edited by jambai on Tue Mar 19, 2013 11:51 am; edited 1 time in total
Mon Mar 18, 2013 11:18 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
The path seems to be correct. Not sure what to make out of this case.

Since all files are in one place, one the things you can do is to use a common file mask \\fs-uc-1\TW\CP\BC-Del\*.* to catch all 3 file types at once
and then using JavaScript or other script type job move only jpg, jpeg, or zip file


Code:
var vReturn;
FileMoveEx( "\\\\Server\\Directory\\files\\*.jpg", "\\\\server\\common\shared\\", vReturn );
FileMoveEx( "\\\\Server\\Directory\\files\\*.jpeg", "\\\\server\\common\shared\\", vReturn );
FileMoveEx( "\\\\Server\\Directory\\files\\*.zip", "\\\\server\\common\shared\\", vReturn );


This wouldn't heart even if a file with different extension get created in the same directory.
Mon Mar 18, 2013 10:00 pm View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
If I give the common file mask, the task runs every minutes of what I gave under "How often do you want to check for these files?.

The task triggered even though there is no files were placed in that directory. It is running

Thanks
Tue Mar 19, 2013 11:51 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Which means the directory is not empty, right?
Can you clean up that directory?
Delete files with unneeded extensions?
Tue Mar 19, 2013 12:52 pm View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
It doesn't matter whether the directory is empty or not empty, the job triggers.

Thanks
Tue Mar 19, 2013 2:19 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Code:
It doesn't matter whether the directory is empty or not empty, the job triggers.


i'm unable to reproduce that issue.

Are there any sub-folders in \\server\directory\files ?

Quote:
When I set up a file watch job on a semaphore file (\\server\directory\files\*.jpg), the job fires fine.
It is not working when I add multiple files (\\server\directory\files\*.jpg, \\server\directory\files\*.jpeg) on the file watch.


I'm able to reproduce this one. Seems like a regression to me. I've reported that case to our internal support system.
Tue Mar 19, 2013 9:57 pm View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
search condition

Code:
\\\\uc-1\\Users\\Jambai\\Test1\\*.*


Code from script editor
Code:
Dim vReturn, Number
Dim crlf, String "\r\n"
Dim vMailMsg, String
ConcatEx( "Pictures Moved. Please check the following Directory" crlf, crlf, "\\\\UC-1\Pictures\Jambai\Archive", vMailMsg )

FileMoveEx( "\\\\uc-1\\Users\\jambai\\Test1\\*.jpg", "\\\\UC-1\Pictures\Jambai\Archive", vReturn )
MailSend( "Jambai@email.com", "", "Jambai@yahoo.com", "INFO: PICTURES ARRIVED", vMailMsg )


Thank you
Thu Mar 21, 2013 3:53 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
There is a number of syntax errors in your script. You are missing commas in several places and the script can be simplified to the following:

Code:
Dim vCount, Number

FileMoveEx( "\\\\uc-1\\Users\\jambai\\Test1\\*.jpg", "\\\\UC-1\\Pictures\\Jambai\\Archive", vCount )
MailSend( "Jambai@email.com", "", "Jambai@yahoo.com", "INFO: PICTURES ARRIVED", "Pictures Moved. Please check the following Directory\r\n\\\\UC-1\\Pictures\\Jambai\\Archive" )

Fri Mar 22, 2013 7:27 am View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
Thank you,

I was masking the original location and missed "\". Other than that I don't find any error.

Quote:
FileMoveEx( "\\\\uc-1\\Users\\jambai\\Test1\\*.jpg", "\\\\UC-1\\Pictures\\Jambai\\Archive", vReturn )


The given code also didn't fix the issue that I am having

Thank you
Fri Mar 22, 2013 10:51 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Quote:
The given code also didn't fix the issue that I am having

Would you please describe again which issue you are talking about? use of multiple file masks in the job file-watch trigger or something else?


Last edited by SysOp on Sat Mar 23, 2013 4:05 pm; edited 1 time in total
Sat Mar 23, 2013 10:55 am View user's profile Send private message
jambai



Joined: 14 Feb 2013
Posts: 22
Country: United States

Post File watch on multiple semaphores Reply with quote
Use of multiple file masks in the job file-watch trigger

Thanks
Sat Mar 23, 2013 2:23 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
The given code is for the job script. It is not related to the job trigger, that is the code that job would run if triggered. The only solution for the moment is to use a single catch-all semaphore file mask, and then in the job handle the details.

As a follow up to my previous note that I've reported the issue with using multiple semaphore file masks to our development team - that issue is going to be fixed in the next build expected sometime next week.

Thank you.
Sat Mar 23, 2013 4:10 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.