alter last accessed and modified ti
|
Original Message
|
Name: markreflex
Date: May 20, 2008 at 09:38:52 Pacific
Subject: alter last accessed and modified tiOS: DOSCPU/Ram: 2gbModel/Manufacturer: compaq |
Comment: I have found out if you type dir /v in DOS it gives you more info. The last accessed and modified date of a filename. I want to alter the modified date from DOS. Is it possible? and i not bothered how i can do it. Is there any DOS utils or seach file finders that can do it. Anything?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: markreflex
Date: May 20, 2008 at 09:59:42 Pacific
|
Reply: (edit)I have found this but i using Win98 disk and can't get find to work on that. @echo off :: This batch file uses DEBUG to help determine :: the last accessed date of a file. Actually, :: you can determine the last access date with :: the "DIR /V" command. All this batch file does :: is extract the last accessed date from the :: response line. It turns out the date we want is :: always in the same character position on the line! :: Debug is used merely to strip away everything :: before the data we want and replace it with text :: that says "set accessed=". Debug is then used :: to set trim away everything after the data we want. if [%1]==[] goto HELP goto RUN :HELP cls echo You must supply a file name as an argument. goto DONE :RUN set accessed= dir /v %1 | find ":" | find "-" > ~setacc.bat > script echo f 100 l 3a 20 >> script echo e 12f "set accessed=" >> script echo rcx >> script echo 43 >> script echo w >> script echo q debug ~setacc.bat < script > nul del script call ~setacc.bat del ~setacc.bat echo Your file was accessed on %accessed%
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: markreflex
Date: May 20, 2008 at 11:03:15 Pacific
|
Reply: (edit)i make it clearer how can i get the 'last accessed time' in DOS of a filename. the time displayed in DOS is usually the modified time. doing dir /V and using the batch above but is there an easier way with a util or an easier batch withoud the find command as i don't have.
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: DAVEINCAPS
Date: May 20, 2008 at 16:36:43 Pacific
|
Reply: (edit)A file's modified date should be the date that shows with the DIR command. DIR/O:D in the directory containing the files will sort them by date and time. To change the date and/or time I've always used Norton Utilities. I think the NU file name is FD.EXE and at least in the dos version I use, it needs to be run from pure dos.
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: markreflex
Date: May 20, 2008 at 17:40:17 Pacific
|
Reply: (edit)i can change the modified date fine with lots of tools. i need to retrieve the last accessed time. this is only shown up doing dir /v. all the tools out there seem to change the modified date. dir/o only lists them in the order. i ust need to get the date of one file not a list of files.
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: DAVEINCAPS
Date: May 20, 2008 at 21:36:52 Pacific
|
Reply: (edit)If you want the last accessed date of a particular file then: DIR/V file name The batch file you listed in your first response works too. You don't need to use the FIND command separately. Either I don't understand what you want or you're doing something wrong.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: