Windows unfortunately does not include such a command line tool, but it should 
be possible to do that with a powershell command which is executed with the 
Shell() function.

so for example this command here

put shell("powershell (ls c:/users/matthias/test.txt).CreationTime = get-date 
2019-12-24-00:00")

would change the creation date of the file c:/users/matthias/test.txt) to the 
24th December 2019 at 00:00

If you want to change the last modification time instead of the creation time 
then use  the parameter LastWriteTime instead of CreationTime

put shell("powershell (ls c:/users/matthias/test.txt).LastWriteTime = get-date 
2019-12-24-00:00")

-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 14.03.2021 um 23:28 schrieb Phil Davis via use-livecode 
> <use-livecode@lists.runrev.com>:
> 
> On Mac or Linux you can use the "touch" shell command - not sure if it's 
> available on Windows. You can download the "Shell Command Help" LC plugin to 
> simplify access to info about it.
> 
> Phil Davis
> 
> 
> On 3/14/21 1:04 PM, Michael Kristensen via use-livecode wrote:
>> Hi there
>> 
>> I want to create/export some images from Livecode to fit into a slideshow 
>> that is sorted by creation date.
>> 
>> It means that the files I export shall have a creation date of the past. So 
>> that when they are put into the folder of the slideshow, the images are 
>> placed automatically at the desired places.
>> 
>> How would you go about to set the creation date of a file to a date in the 
>> past with Livecode (maybe with the help of shell or applescript)
>> 
>> Thanks
>> Michael
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> -- 
> Phil Davis
> 503-307-4363
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to