Setting Creation Date of file to a past date?

Sean Cole (Pi) sean at pidigital.co.uk
Tue Mar 16 00:00:57 EDT 2021


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) <sean at pidigital.co.uk> 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 at 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
>>   ahsoftware at gmail.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>



More information about the use-livecode mailing list