Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

touch sensitive to order of options

Mar
39
1
I tested a directory date change via touch with the /n option
TCC showed the proposed change. When I removed the /n the change failed. I had to put the /a:d option first and remove the \ from the directory name. See below:

C:\...d\AppData\Local\Temp>md testdater

C:\...d\AppData\Local\Temp>touch /n /d01-10-2000 /a:d testdater\
1/10/2000 13:06:53.193 C:\Users\Howard\AppData\Local\Temp\testdater\

C:\...d\AppData\Local\Temp>touch /d01-10-2000 /a:d testdater\
TCC: (Sys) The system cannot find the file specified.
"C:\Users\Howard\AppData\Local\Temp\testdater\"

C:\...d\AppData\Local\Temp>touch /a:d /d01-10-2000 testdater\
TCC: (Sys) The system cannot find the file specified.
"C:\Users\Howard\AppData\Local\Temp\testdater\"

C:\...d\AppData\Local\Temp>touch /a:d /d01-10-2000 testdater
1/10/2000 13:07:34.939 C:\Users\Howard\AppData\Local\Temp\testdater

C:\...d\AppData\Local\Temp>
 
The problem isn't with the order of the options, it is with the trailing \ on the directory name, which the Windows API is choking on. (Most of the Windows APIs accept a trailing \ on a directory name, but not this one.)

The /N option doesn't actually call the change date/time API, so it won't fail with a trailing \.

You don't have to put the /A:D first:

touch /d01-10-2000 /a:d testdater
works fine.
 
---- Original Message ----
From: rconn
| The problem isn't with the order of the options, it is with the
| trailing \ on the directory name, which the Windows API is choking
| on. (Most of the Windows APIs accept a trailing \ on a directory
| name, but not this one.)

The next release of TCC might truncate trailing \ from names passed to this particular API, thus allowing TCC users to treat all commands uniformly in this respect(be better than the API). Not a high priority, since directory dates (except creation) are automatically updated whenever directory content changes (modification date) or the directory is accessed. Rex, do not bother to respond to this suggestion. If you do it, it will be in "What's New", if you don't, we will live with it as we had for many years.
--
Steve
 

Similar threads

Replies
6
Views
3K
Replies
2
Views
2K
Replies
2
Views
2K
Back
Top