Question with few Qshell commands runs with IFS directory
Posted on 2007-03-27
I have one question about few command used with IFS directory. We receive few files from different system via NDM ( Connectivity Services). That files directly comes into IFS directory (lets say DirA) . One job ( lets say JobA) keep polling that file every 10 min. If he gets any file then it zips the file into different IFS directory (Lets say DirB) and deletes the file from original location.
When JobA finds any file in DirA then it zips all the file which are available with *.* parameter. So all the file will be ziped into one file.Then it deletes all the file again by *.* paramater.
Now problem is when JobA start running and zips all the file with *.* lets say it has got 3 files.And the same time transmission of 4th file is running.That means 4th file has not fully arrived. So it zip (*.*) that file wont get include. But when next command deletd *.* runs the transmisson of 4th file has completed and so that file gets deleted with out getting zipped.
As a soltuion of this what I am planning is I will list all the files with 'LS' command. I will take that output in to one variable and fetch all files one by one. After fetching the file from variable I will copy the file into new directory and then delete from original directory. Once I copy and delete all the file I will zip those files from new directory.This will insure that I will copy only those files which have been included into 'LS' command. So if transmission of any file is runnign while I run the 'LS' command that file wont get included into that and that file wont get copied and deleted.
Is this a right solution and if yes then will the file which transmisson is running while I run the LS command be included into the output of 'LS' command ?
My apologies for the length of this question but I wanted to make sure that every one understand my question.