Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


James Hagist
2020-06-29T16:46:38Z
I have a copy file job and I want to confirm the arrival of all the files before I go to the next task. However in testing, using Touch File task, I can see a file that is missing with No Output Status.

I would like to use something based on that to trigger another task etc.

How would you go about that?
Sponsor
Forum information
James Hagist
2020-06-29T19:09:53Z
I should add. I have tried the read file option and I am getting this error message "Exception in Task: Exception of type 'System.OutOfMemoryException' was thrown."

I assume this is because the file is 144 gb
Support
2020-06-30T08:50:45Z
I am not sure I follow about the touch file. This should be fast independent of size and the Task should have the file path as output. Are you experiencing something else?

About the Read file - yes, it is not optimal to read that into memory. What do you want to do with the file?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
James Hagist
2020-06-30T11:46:39Z
So I am attempting to confirm that all files have been copied to a new directory. I have set up a loop to pass the file name to the Touch File action but if the file is not there all that is returned is "No Output"

I want was hoping to get an error message or something I could use to wait for awhile and then check again.

bweston
2020-06-30T21:39:17Z
I'm not sure Touch File is what you're looking for.

"The Touch file Task set the last write time of one or more file(s). The Touch file Task uses the standard file filter to find files that you want to touch."

In context of the standard "touch" command, if the file doesn't exist, "touch" will create an empty file by that name, and not consider it an error.

(Edit: Actually I just tested this and Visualcron apparently does not create the file if it doesn't exist. I assumed it would be like the standard "touch" command in that regard and I was wrong.)

I think you may want to LIST files. However, unless Visualcron uses intermediate files and renames them, that would detect the file as being there while it was still being copied. Also, normally, the Copy Files task wouldn't stop and pass execution to the next task until it had finished and released all file handles unless you uncheck "run tasks in order" for the job, I don't think. I'm not sure I'm properly grasping the use case.
Support
2020-07-01T16:11:26Z
Originally Posted by: bweston 

I'm not sure Touch File is what you're looking for.

"The Touch file Task set the last write time of one or more file(s). The Touch file Task uses the standard file filter to find files that you want to touch."

In context of the standard "touch" command, if the file doesn't exist, "touch" will create an empty file by that name, and not consider it an error.

(Edit: Actually I just tested this and Visualcron apparently does not create the file if it doesn't exist. I assumed it would be like the standard "touch" command in that regard and I was wrong.)

I think you may want to LIST files. However, unless Visualcron uses intermediate files and renames them, that would detect the file as being there while it was still being copied. Also, normally, the Copy Files task wouldn't stop and pass execution to the next task until it had finished and released all file handles unless you uncheck "run tasks in order" for the job, I don't think. I'm not sure I'm properly grasping the use case.



You are right. We will fix this for next build to create file if it does not exist.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2020-07-13T07:26:21Z
James Hagist
2020-07-14T18:58:41Z
yes... this seems to work as expected.

So for the initial question about how to confirm that a file was copied to another directory I ended up using the list task.
    Task 1: Run a list command against the source directory

    Task 2: Create a list command that reads the target

    Loop: Create loop on 2nd list task. Have loop read output of first list task

    Use the loop variable in the 2nd list command


Support
2020-07-16T13:41:00Z
Originally Posted by: James Hagist 

yes... this seems to work as expected.

So for the initial question about how to confirm that a file was copied to another directory I ended up using the list task.

    Task 1: Run a list command against the source directory

    Task 2: Create a list command that reads the target

    Loop: Create loop on 2nd list task. Have loop read output of first list task

    Use the loop variable in the 2nd list command




That sounds like it should work. Does it work out well for you?
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
James Hagist
2020-07-17T17:51:41Z
Yes it works well and generates an error when the copy fails due to something??? It is not from VC but sometimes the files never arrive on the NAS.

Thanks for the assistance
Support
2020-07-20T12:07:49Z
Originally Posted by: James Hagist 

Yes it works well and generates an error when the copy fails due to something??? It is not from VC but sometimes the files never arrive on the NAS.

Thanks for the assistance



Great. You're welcome!
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top