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


hansvl
2020-12-24T13:35:31Z
How can get the modification date of a file and write that file-date to a Job variable?
Sponsor
Forum information
Gary_W
2020-12-24T15:22:52Z
Create your job variable. let's call it "JobFileLastModDate".
Then create a new Internal task of Set Job variable. The Value will be selected from the File variables section of the Variables, FileModifiedDate.

{FILE(ModifiedTime|c:\textfile.txt|yyyy-MM-dd HH:mm:ss)} The file and format could be variables too.
hansvl
2020-12-24T15:41:38Z
Thanks for your quick reaction.
I only know "{FILE(Size"
Is "{FILE(ModifiedTime" also described in the documentation, just like "{DATEFORMAT" in the URL below?
https://www.visualcron.c...date_time_variables.html 
Gary_W
2020-12-24T15:56:27Z
I don't know but you can play around with different values in the variables window and see their results without hurting anything. Give it a try.

Try this: {FILE(ModifiedTime|c:\windows\explorer.exe|yyyy-MM-dd)} as you change the date format you'll see the change immediately in the value preview box.
Joey S
2020-12-29T17:06:44Z
Sometimes the easiest way to find what you want is browsing the variables list. I do not think I have looked at the documentation in a while so maybe that is easier but if you open any task or job you can get to the variables at the bottom left of the window. Or, go to your Server tab at the top (between "File" and "Tools") and then click on "Variables" you will get a variables list.

You can see what Gary was referring to as well as a number of other builtin variable options for Files.


image.png
image.png
Support
2021-01-07T10:30:44Z
Originally Posted by: hansvl 

How can get the modification date of a file and write that file-date to a Job variable?



Hi Hans,

Just checking in, did you get your issue solved?
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
hansvl
2021-01-07T11:15:40Z
Support
2021-01-07T12:31:41Z
Originally Posted by: hansvl 

Yes, my issue is solved.



Thanks for confirming!
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top