hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I put a file name into a variable from monitor task?

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
rsamoose



Joined: 27 Oct 2008
Posts: 28
Location: Bethlehem, PA

PostPosted: Thu Jun 10, 2010 5:49 am    Post subject: How do I put a file name into a variable from monitor task? Reply with quote

How do I put the name of a file being processed by a file monitor task (or unzip archive task) into a variable to be used by an automize script?

The full scope of my chain is to unzip a file and append the name of the zip archive to the front of the unzipped file. I intend to do this using string manipulation.

I also want to ensure that only one file is processed through the chain at any given time.

Thank you.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Thu Jun 10, 2010 7:38 am    Post subject: Reply with quote

if you want to process one file at a time, a directory loop is the better option. for every loop, there is a variable ::CurrentFilename

for every loop, run the chain to run your tasks and use this variable..
Back to top
View user's profile Send private message
rsamoose



Joined: 27 Oct 2008
Posts: 28
Location: Bethlehem, PA

PostPosted: Thu Jun 10, 2010 11:13 am    Post subject: Reply with quote

Thank you for the quick response.
I have a bit of a quandary... Some of the files we will be processing could require an decryption & unzip process taking up to 10 minutes. On the other hand we could be receiving 100 small files in an hour.
My understanding of the "Delay between loops" setting is that it must be large enough to allow the largest file to process- in order to assure only 1 file is being processed at any given time. Yet I may never process all files if I wait 10 minutes between processing.

I see a reference to a dummy echo task in post “Directory Loop and sequential task execution?” dated Fri Apr 24, 2009 1:56 am
What exactly should the dummy task do? … output to the log file?

Thank you.
Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 635
Location: Santa Barbara, california

PostPosted: Fri Jun 11, 2010 3:43 pm    Post subject: Reply with quote

does it matter if there are multiple decryption and unzip processes running simultaneosly? do they fail?

seems like it would be difficult to do this from a loop and meet your criteria of 10 minutes per loop + 100 files per hour. there just is not enough time without simultaneous processing..
Back to top
View user's profile Send private message Send e-mail
rsamoose



Joined: 27 Oct 2008
Posts: 28
Location: Bethlehem, PA

PostPosted: Mon Jun 14, 2010 8:57 am    Post subject: the fun continues... Reply with quote

My full scope is this:
1- FHB-SFTP_DirectoryLoop- call FHB_IncomingChain
a. FHB- _IncomingChain
i. FHB-MoveSFTPtoStaging- move file from SFTP to …Staging\[yyymmdd\ folder
ii. FHB-CopyStagingTo_ENCRYPT- copy file from …Staging\[Date] to _ENCRYPT
iii. FHB-Decrypt- decrypt file in _ENCRYPT and move to _DECRYPT
iv. FHB-ChangeZipArchiveExtension- .TXT to .zip
v. FHB-UnzipFile- unzip archive from _DECRYPT to _UNZIPPED
vi. FHB-AppendNameScript- append archive name to beginning of unzipped file name and replace all “.” With “_”and add .xch extension.
vii. FHB-Move_UnzippedTo_Processing- Move the unzipped file to Staging\_Processing folder
viii. FHB-DeleteZipArchive- deletes Zipped archive from _DECRYPT folder

My issue is that several of the Zipped archives contain a file with the same name. So in order to differentiate between the multiple files I am appending the archive name to the front of the unzipped file.

I fear having multiple files running simultaneously will muddle the file renaming portion of my chain.
Of course my concern is alieviated if each task run by a chain is isolated from the same task running simutaneously in another chain instance.

I am still in the process of testing running multiple files... [2:26 EDT]- I am having difficult only processing one file when multiple files are put in the directory simultaneously.

Is there a way to only pick one file from the watch folder at any time?

... Nevermind... The "DirectoryLoop::CurrentFilename" variable did the trick.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 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