I need to get the modified date from windows for files, but I can't find a function that will do that.
I can get the creation date with "Job.FileCreationDate", but I need the equivalent for the modified date.
I have tried "Doc.Modified" but that doesn't take the date from the file info in Windows it seems, so the date can be off a number of days.
Is there a way to get the modified date? I can see the column in the switch file info window but it seems impossible to use that date.
Maybe I need to create a script, but how do I get that date in as switch script then?
Get modification date for a job file
- billy.olvestad
- Member
- Posts: 54
- Joined: Mon Nov 19, 2018 10:08 pm
- Location: Sweden
- Contact:
Re: Get modification date for a job file
I logged it as a feature request, but with this code snippet you can add the modification date to the job's private data:
Code: Select all
var modDate = new File( job.getPath()).lastModified;
job.setPrivateData( "ModificationDate", modDate);
- billy.olvestad
- Member
- Posts: 54
- Joined: Mon Nov 19, 2018 10:08 pm
- Location: Sweden
- Contact:
Re: Get modification date for a job file
Oh my god, that was simplefreddyp wrote: ↑Fri Feb 15, 2019 9:12 am I logged it as a feature request, but with this code snippet you can add the modification date to the job's private data:Code: Select all
var modDate = new File( job.getPath()).lastModified; job.setPrivateData( "ModificationDate", modDate);
Thank you very much. You saved my day!
It works like a charm.