Re: Setting Creation Date of file to a past date?
Sean- Thanks. I didn't know about SetFile. -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: Setting Creation Date of file to a past date?
I used quotes wrong, use this: >From LC, use: put "powershell -command ^(Get-Item 'C:\Folder\File.txt').CreationTime=('31 December 2019 23:59:59')^" into tShell replace "^" with quote in tShell get shell(tShell) Sean On Tue, 16 Mar 2021 at 03:57, Sean Cole (Pi) wrote: > Touch tells it to update to now unless the date set is in the past and you > use the -d modifier. > > If you install the Command Line Tools package from Apple on a mac you can > use the much better SetFile -d '12/31/1999 23:59:59' file.txt > > > On windoze, using powershell, send the command: > (Get-Item "C:\Folder\File.txt").CreationTime=("31 December 2019 23:59:59") > > From LC, use: > put "powershell -command '(Get-Item > 'C:\Folder\File.txt').CreationTime=('31 December 2019 23:59:59')' into > tShell > replace "'" with quote in tShell > get shell(tShell) > > Sean > > On Tue, 16 Mar 2021 at 01:35, Mark Wieder via use-livecode < > use-livecode@lists.runrev.com> wrote: > >> On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote: >> > Windows unfortunately does not include such a command line tool >> >> I am astounded to find there is no touch command for Win. >> However, there does appear to be a solution for Windows (untested) using >> commandline options for the copy command: >> >> date desiredDate >> copy /b filename.ext +,, >> >> >> https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716 >> >> -- >> Mark Wieder >> ahsoftw...@gmail.com >> >> ___ >> 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
Re: Setting Creation Date of file to a past date?
Touch tells it to update to now unless the date set is in the past and you use the -d modifier. If you install the Command Line Tools package from Apple on a mac you can use the much better SetFile -d '12/31/1999 23:59:59' file.txt On windoze, using powershell, send the command: (Get-Item "C:\Folder\File.txt").CreationTime=("31 December 2019 23:59:59") >From LC, use: put "powershell -command '(Get-Item 'C:\Folder\File.txt').CreationTime=('31 December 2019 23:59:59')' into tShell replace "'" with quote in tShell get shell(tShell) Sean On Tue, 16 Mar 2021 at 01:35, Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote: > > Windows unfortunately does not include such a command line tool > > I am astounded to find there is no touch command for Win. > However, there does appear to be a solution for Windows (untested) using > commandline options for the copy command: > > date desiredDate > copy /b filename.ext +,, > > > https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716 > > -- > Mark Wieder > ahsoftw...@gmail.com > > ___ > 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
Re: Setting Creation Date of file to a past date?
On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote: Windows unfortunately does not include such a command line tool I am astounded to find there is no touch command for Win. However, there does appear to be a solution for Windows (untested) using commandline options for the copy command: date desiredDate copy /b filename.ext +,, https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716 -- Mark Wieder ahsoftw...@gmail.com ___ 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
Re: Setting Creation Date of file to a past date?
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 > : > > 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
Re: Setting Creation Date of file to a past date?
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
Setting Creation Date of file to a past date?
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