Detailed File Information for One File

Bob Sneidar bobsneidar at
Fri Apr 27 13:14:58 EDT 2018

Not to beat a severely wounded horse, but one reason for implementing a detailed file function (and probably why it hasn't been tackled) is that getting the detailed file information from a command shell is decidedly  NOT straightforward. *NIX has an ls function, and also has a date function. The date function cannot it seems accept spaces in the name, but will accept relative paths like ~/Desktop/test.xlsx. ls -r will only give you the year if the date is beyond 6 months from present. Date accepts a path in quotes or not, but if there is a space in the path you must enclose in quotes. ls decidedly CANNOT have a quoted path. 

Windows gets dicier. Typically you would use WMIC and build a query, but I think it only works with local files, and not network shares (Parallels uses network paths for Mac FolderSharing). It uses back slashes, and these have to be escaped as in \\. 

There are a number of other gotchas for each platform, but the upshot is that it's a beatch trying to piece together shell commands that work reliably in all use cases for every platform. I am sure that after a half a day and struggling through all the exceptions for each platform I could piece together a way to do it, but it's a real pig I can tell you. 

Bob S

> On Apr 26, 2018, at 16:13 , Bob Sneidar <bobsneidar at> wrote:
> I can't find anything on the forums, which is par for the course, evwn though I know it's been discussed. Is there an LC way to get details about a file without shelling out to do it? I need to get the last modified date of a file so I can check to see if I need to update the version in a database when importing it. I would very much NOT like having to get the detailed files of a folder and filter for the file I am looking for as I already have a path to the actual file, and a folder may contain a lot of files. 
> Bob S

More information about the Use-livecode mailing list