Timestamp Problem

M

Mikhail

hi,

I have a Windows 2000 Advanced server (ftp server). I need
to get the timestamp of a file. The problem is when I use
the commands dir,dir /od /tc and dir /od /tw it gives me a
same result, timestamp is the same. Is there a workaround
on this?


example: File is test.txt

c:> dir test.txt

output:
06/16/2004 15:10 709 test.txt

c:> dir /od /tc test.txt

output:
06/16/2004 15:10 709 test.txt

c:> dir /od /tw test.txt

output:
06/16/2004 15:10 709 test.txt

thanks in advance,

Mikhail
 
M

Matthias Tacke

Mikhail said:
hi,

I have a Windows 2000 Advanced server (ftp server). I need
to get the timestamp of a file. The problem is when I use
the commands dir,dir /od /tc and dir /od /tw it gives me a
same result, timestamp is the same. Is there a workaround
on this?


example: File is test.txt

c:> dir test.txt

output:
06/16/2004 15:10 709 test.txt

c:> dir /od /tc test.txt

output:
06/16/2004 15:10 709 test.txt

c:> dir /od /tw test.txt

output:
06/16/2004 15:10 709 test.txt

thanks in advance,

Mikhail


Is your C-drive fat or ntfs ? The dir /T works only with ntfs drives.

My output onan ntfs drive is:
F:\Temp>for %a in (" " w c) do @dir /T%~a test.txt|find "2004"
2004-06-16 09:57 688 test.txt
2004-06-16 09:57 688 test.txt
2004-06-16 09:56 688 test.txt

F:\Temp>

HTH
 
M

Mikhail

thanks Matthias.

My drive is NTFS. The files being copied in my ftp server
are copied after an hour after they are created, so could
probably imagine the timestamps of each file. Why is it
the timestamps doesn't work as expected?

expected output:

f:> dir
2004-06-16 09:57 688 test.txt

f:> dir /od /tw

2004-06-16 09:57 688 test.txt

f:> dir /od /tc

2004-06-16 10:57 688 test.txt

regards
 
P

Paul R. Sadowski

Mikhail said:
hi,

I have a Windows 2000 Advanced server (ftp server). I need
to get the timestamp of a file. The problem is when I use
the commands dir,dir /od /tc and dir /od /tw it gives me a
same result, timestamp is the same.

It would on the same file since the creation time and the last
modified/write time would be the same unless some process wrote to the file
since it was put on the server.
 
M

Mikhail

thanks Paul
-----Original Message-----



It would on the same file since the creation time and the last
modified/write time would be the same unless some process wrote to the file
since it was put on the server.


.
 
M

Matthias Tacke

Mikhail said:
thanks Matthias.

My drive is NTFS. The files being copied in my ftp server
are copied after an hour after they are created, so could
probably imagine the timestamps of each file. Why is it
the timestamps doesn't work as expected?

expected output:

f:> dir
2004-06-16 09:57 688 test.txt

f:> dir /od /tw

2004-06-16 09:57 688 test.txt

f:> dir /od /tc

2004-06-16 10:57 688 test.txt

regards
Well, you have to change your expectations :)
The (c)reation date/time can't be later than last (w)rite or (a)ccess
The following is on the same testfile, too check append something:
==screen=copy=========================================================
F:\Temp>for %a in (c a w) do @dir /T%~a test.txt|find "2004"
2004-06-16 09:56 688 test.txt
2004-06-16 14:35 688 test.txt
2004-06-16 09:57 688 test.txt

F:\Temp>echo/test>>test.txt

F:\Temp>for %a in (c a w) do @dir /T%~a test.txt|find "2004"
2004-06-16 09:56 694 test.txt
2004-06-16 14:41 694 test.txt
2004-06-16 14:41 694 test.txt
==screen=copy=========================================================
I changed the order to (c a w) as it occurs in my help.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top