How to calculate timestamp difference
Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts
Page 1 of 1
I need to determine the timestamp difference between a local file and a server file. The transfer of a local file shall depend on a certain result of the calculation of timestamp local minus timestamp server.
In my project I use
${FileInfo("resource:smb://folder/file.csv"):lastModifiedMillis()} - ${CurrentTimeMillis()} for the local file.
In my project I use
${FileInfo("resource:smb://folder/file.csv"):lastModifiedMillis()} - ${CurrentTimeMillis()} for the local file.
- Support Specialist
- Posts: 590
- Joined: Tue Jul 17, 2012 2:12 pm
- Location: Phoenix, AZ
-
vogola,
The Pseudo breakdown would be something like this...
Make the connection to your Remote Server and create a FileList var (RmtFiles) of the files you need to test. -- Or, you could get the files and generate a FileList var --
Loop through the RmtFiles FileList var
Get the lastModifiedDate (FileInfo) of the RmtFile
Find and get the corresponding lastModifiedDate (FileInfo) of the Local File to compare
Do Comparison of the 2 Dates
Function according to value
EndLoop
The Pseudo breakdown would be something like this...
Make the connection to your Remote Server and create a FileList var (RmtFiles) of the files you need to test. -- Or, you could get the files and generate a FileList var --
Loop through the RmtFiles FileList var
Get the lastModifiedDate (FileInfo) of the RmtFile
Find and get the corresponding lastModifiedDate (FileInfo) of the Local File to compare
Do Comparison of the 2 Dates
Function according to value
EndLoop
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts
Page 1 of 1