• Re: Windows 10 22H2 and nircmd

    From =?UTF-8?B?TWlnaHR54pyFIFdhbm5hYmXin@21:1/5 to malone on Sat Jan 28 21:50:24 2023
    malone wrote on 1/28/2023 8:46 PM:
    Anyone using nircmd.exe with the "setfiletime" command?

    It seems that after an upgrade of Windows 10 to 22H2 it no longer does anything. Other nircmd commands work but not setfiletime. On two
    computers it worked perfectly before but not after the upgrade.

    My searches haven't revealed anything.  Anyone else seen this?



    I know a free portable program to simulate the commander, which can also
    change the time-stamp and attributes of files. Do you want to check it out?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From malone@21:1/5 to All on Sun Jan 29 16:16:06 2023
    On 29 Jan 2023 3:50 pm, Mighty✅ Wannabe✅ wrote:
    malone wrote on 1/28/2023 8:46 PM:
    Anyone using nircmd.exe with the "setfiletime" command?

    It seems that after an upgrade of Windows 10 to 22H2 it no longer does
    anything. Other nircmd commands work but not setfiletime. On two
    computers it worked perfectly before but not after the upgrade.

    My searches haven't revealed anything.  Anyone else seen this?



    I know a free portable program to simulate the commander, which can also change the time-stamp and attributes of files. Do you want to check it out?


    Thanks - but I think I've just sorted it out with nircmd. For some
    reason I've yet to resolve files got moved into a different folder and
    nircmd doesn't tell you it can't find the file the date of which you're
    wanting to change or flag an error. It just does nothing.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to malone on Sat Jan 28 23:23:52 2023
    malone <malone@nospam.net.nz> wrote:

    Anyone using nircmd.exe with the "setfiletime" command?

    It seems that after an upgrade of Windows 10 to 22H2 it no longer does anything. Other nircmd commands work but not setfiletime. On two
    computers it worked perfectly before but not after the upgrade.

    My searches haven't revealed anything.  Anyone else seen this?

    <prelude>

    What is the exact syntax of the command line you use, including the double-quote characters?

    According to nircmd.chm help file, the syntax is:

    nircmd.exe setfiletime "<filespec>" "<createDate> [<modifiedDate> [<accessedDate>]]

    The parameters are positional. To specify accessedDate, you must
    specify modifiedDate, and to specify modifiedDate requires createDate be specified. The date args must be enclosed in double-quotes, and be of
    the format dd-mm-yy hh:nn:ss. If an arg is empty (2 contiguous
    double-quotes), that value is not changed on the file. You can
    substitute now for an arg to indicated the current date and time. The
    filespec arg can specify a file, or include wildcards, and it must also
    be enclosed in double-quotes. So you could use:

    nircmd.exe setfiletime "c:\temp\log.txt"
    which changes none of the timestamp attributes.

    nircmd.exe setfiletype "c:\temp\log.txt" "08-11-2008"
    to change only the create timestamp attribute.

    nircmd.exe setfiletype "c:\temp\log.txt" now now
    to change the created and modified timestamps to the current date and
    time, but not touch the accessed timestamp.

    nircmd.exe setfiletype "c:\temp\*.txt" "05-11-2019" "" now
    to change the created timestamp to now, not touch the modified
    timestamp, and change the accessed timestamp to now for all matching txt
    files in the specified path.

    You never specified the exact syntax you are using now versus before.
    If you are using a batch file, and have not edited it since it worked,
    it would be using the same syntax now as before, but that assumes your
    batch file doesn't pick up any command-line args to use for args to
    nircmd.exe.

    </prelude>


    I did a test. I ran:

    echo hello there > c:\temp\testfile.txt

    A new file was created with created, modified, and accessed timestamps
    of now. I then ran:

    nircmd.exe setfiletime "c:\temp\testfile.txt" "01-01-2020"

    and the created timestamp for the file did not change. I realized my
    syntax error (omitted the hh:nn:ss parameter), and ran:

    nircmd.exe setfiletime "c:\temp\testfile.txt" "01-01-2020 11:11:11"

    Still no change on the created timestamp for the file. I ran nircmd.exe
    under an admin-level account, and in an elevated command console.

    I have verified your incidence of nircmd's setfiletime not working. If
    you want it fixed, report the bug at:

    https://www.nirsoft.net/contact-new.html

    nircmd.exe has not been updated since 01/08/2019 when 2.86 was released.
    I'm still back on the 2.83 version of nircmd.exe, but the released notes
    for nircmd don' indicate anything regarding timestamp fixes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)