Page 1 of 1

Getting the file date of a txt file

Posted: Sun Jan 10, 2016 11:37 pm
by quailcreek
Hi,
I'm using a txt file to populate a datagrid in an iOS app. I would like to do some version control so a newer file will automatically be loaded. My question is, how do I get the date of a txt file or is there a better way to do this that from the date? Thanks for the help.

Re: Getting the file date of a txt file

Posted: Mon Jan 11, 2016 7:18 am
by scrabbles
Hi,

Check out "long" in the dictionary, as it can be used with file commands. e.g.

Code: Select all

set the defaultfolder to "/"
put the detailed files
A checksum or other hash might be more reliable than just timestamp.

Re: Getting the file date of a txt file

Posted: Tue Jan 12, 2016 12:29 am
by quailcreek
Thanks scrabbles. That's not going to work. I think Ill just put the text into flds in a stack and pull the text from there.

Re: Getting the file date of a txt file

Posted: Tue Jan 12, 2016 2:35 am
by dave.kilroy
Hi Tom, try the detailed files and then use the modified date - I use this value in various apps when syncing between local and remote copies is needed...

Re: Getting the file date of a txt file

Posted: Tue Jan 12, 2016 3:32 am
by quailcreek
Thanks again Dave. I'll take a look at that.