You are not logged in.

#1 13 Feb 2006 23:30

Pnut
Member
Registered: 13 Feb 2006
Posts: 3

Change file time/date stamps

I noticed the touch command, but it is not working....here is what I have tried:

touch /t 2005 03 15 06 32 45 test.txt

touch 2005 03 15 06 32 45 test.txt

/t 2005 03 15 06 32 45 test.txt

None of these work.  What am I doing wrong....

Offline

#2 13 Feb 2006 23:48

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: Change file time/date stamps

try just

touch test.txt

does that set the date time to now?
If not  - what error do you see - check permissions

Offline

#3 14 Feb 2006 03:50

Pnut
Member
Registered: 13 Feb 2006
Posts: 3

Re: Change file time/date stamps

The exact error is:

'touch' is not recognized as an internal or external command, operable program or batch file.

I don't think I'm doing this right....I remember from years ago I used to use fd (fix date), but apparently that has changed.

Please advise

Offline

#4 14 Feb 2006 09:55

maTTko
Member
Registered: 10 Feb 2006
Posts: 5

Re: Change file time/date stamps

you have not set path to touch command

Last edited by maTTko (14 Feb 2006 09:56)

Offline

#5 14 Feb 2006 16:00

Pnut
Member
Registered: 13 Feb 2006
Posts: 3

Re: Change file time/date stamps

I just figured out how to type the code but its not changing the date.  I manually change the date of the computer through the D&T Properties window then typed: 

path touch test.txt

...with no luck, then I typed:

path touch 2005 04 15 07 30 00 test.txt
and
path touch /t 2005 04 15 07 30 00 test.txt

None of these gave me an error so each time I thought that it worked, but it didn't......??


I used to mess around years ago with the command prompt before and after Microsoft came out with windows.  It's been a while and a lot has changed, but it looks the same.  If I can change the date and time in windows, I would, but I remember it being much easier years ago to just goto the cmd prompt.  Forgive me, I'm a VB and VBA programmer and I hardly mess in that area anymore.

So what do I know?

Pnut

Last edited by Pnut (14 Feb 2006 20:45)

Offline

#6 15 Feb 2006 00:07

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: Change file time/date stamps

Make sure the file doesnt have it's read-only flag set (ATTRIB)
Try putting  touch.exe and the file in the same folder
Try touch /? - to check you have the same version (there are lots of 3rd party touch programs out there)
You could also try it with a different file as a test

Offline

Board footer

Powered by