How do I get the modified date of a file?  Sorry if this has been posted, but I did not have any luck searching the forums.
Thanks,
wake
			
			
									
									
						file attributes
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
- 
				Janschenkel
- VIP Livecode Opensource Backer 
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
You have to do it in a roundabout way, by means of the detailed files
HTH,
Jan Schenkel.
			
			
									
									Code: Select all
on mouseUp
   answer file "Select a file and I'll tell you the modification date"
   if the result is "Cancel" then exit mouseUp
   put it into theFilePath
   -- extract the filename and folderpath
   set the itemDelimiter to slash
   put item 1 to -2 of theFilePath into theFolderPath
   put item -1 of theFilePath into theFileName
   set the itemDelimiter to comma
   -- save and change the defaultfolder, read the detailed files, restore the defaultfolder
   put the defaultFolder into theOldDefaultFolder
   set the defaultFolder to theFolderPath
   put the detailed files into theFileInfo
   set the defaultFolder to theOldDefaultFolder
   -- remove the file information that we don't need
   filter theFileInfo with (URLEncode(theFileName) & ",*")
   -- the fifth item is the modification date, expressed in seconds
   put item 5 of theFileInfo into theModificationDate
   convert theModificationDate from seconds to internet date
   answer theModificationDate
end mouseUpJan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
						www.quartam.com