get file date & time modification

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

get file date & time modification

Post by Mariovaisman »

Hello all,

I am trying to know the date and time of files in a cspro application, like we see when we are using explorer or other software. Also need to know using the app in Android devices. I couldn't find the way to do it. There is the dirlist function that gives only the name and the full path but no more information. Is it possible, and how.

Thanks

Mario
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: get file date & time modification

Post by josh »

Unfortunately there is no function for that in CSPro. On Windows you could hack something together using execsystem but on Android I can't see any way to do it.
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: get file date & time modification

Post by Mariovaisman »

Thnk you Josh,

Is it possible to have this function in a future cspro version?

Thanks

Mario
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: get file date & time modification

Post by josh »

What would you use it for?
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: get file date & time modification

Post by Mariovaisman »

Thanks for your answer.
I need to do some analysis with the creation or modification date and time, and with that information I can speed up some process.

Thanks

Mario
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: get file date & time modification

Post by Mariovaisman »

Sorry if continue with this.

The function could be FILEDATE and/or FILETIME

Thanks

Mario
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: get file date & time modification

Post by josh »

Would you need this function if syncfile was smart enough to only transfer files that had changed since they were last transferred or would you use it outside of sync?
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: get file date & time modification

Post by Mariovaisman »

In fact one of the functionality is for file transfers that I have to do using FTPS, and it is not possible to do it using a different technology because it is part of the terms of reference and it is audited by CDC.

In the current application version we are sending all data based on the cluster number that is currently open, however most of those files do not have differences from the previous transmission, and in the central office, those files appear as new version and are downloaded taking much additional time to complete the process.

Thanks

Mario
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: get file date & time modification

Post by Gregory Martin »

It requires some programming, but you could create a lookup file that keeps tracks of files synced as well as their MD5 hash, which you can get with this function:

http://www.csprousers.org/help/CSPro/di ... ction.html

Then, whenever you want to check whether you should send a file, you would lookup the filename in the lookup file, compare if the MD5 hash has changed, and only upload the file if it has. In that case, you would writecase the new MD5 hash value.
Mariovaisman
Posts: 133
Joined: February 11th, 2013, 8:26 am

Re: get file date & time modification

Post by Mariovaisman »

Thanks Gregory,

It works very fine, and it is exactly what I need.

Best

Mario
Post Reply