LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I'm new with Mac OSX and Live Code and would like to know how to change a file’s last modified on Mac OSX. I tried the command below but it seems it doesn't work:
- launch touch -mt 201201010000 "/Users/me/Documents/test.html" with "/Applications/Utilities/Terminal.app"
you need to use the SHELL function to fire the actual terminal command like this:
...
put "/Users/me/Documents/test.html" into tFile2Touch
get shell("touch -mt 201201010000" && tFile2Touch)
...
You may need to escape the filename if it contains spaces etc.
Thanks a lot Klaus.
Adding QUOTE works perfectly. As well as using the function you've wrote.
...
put QUOTE & "/Users/me/Documents/test v1/test with spaces.html" & QUOTE into tFile2Touch
get shell("touch -mt 201201010000" && tFile2Touch)
...