Hi everyone,
I hope someone can help me with this. I am trying to monitor some folders on my file server for changes.
I am trying to get a folder names with timestamp of when contents of the directory where last changed. I have managed to get some of it to work by using for example
dir D:\<foldername>\/T:C /T:W >> C:\<filename>
Which works great it provides an output, but what is strange is that the folders contained for example in
D:\<foldername> have a new timestamp where as the root folder does not reflect a change in timestamp.
So for example D:\folderA has a timestamp of 01/19/2011 but when I go into FolderA to check the timestamp of a subfolder I get a much more recent timestamp of 07/27/2011
I am hoping someone can provide some help with getting a time stamp without getting the details of the subfolders.
Thanks
Samantha
Dos Script for Directory Timestamps
Moderator: DosItHelp
Re: Dos Script for Directory Timestamps
In the Example are two option of "/t". Only the last option will used the DIR command.
option "/t:c" for timestamp "create"
option "/t:a" for timestamp "last access"
option "/t:w" for timestamp "last writing"
When using the option "/t" also add the option "/o:d".
List only all subfolders in the folder "C:\Test" in the order of creating this folders.
option "/t:c" for timestamp "create"
option "/t:a" for timestamp "last access"
option "/t:w" for timestamp "last writing"
When using the option "/t" also add the option "/o:d".
Code: Select all
dir C:\Test\ /a:d /o:d /t:w
List only all subfolders in the folder "C:\Test" in the order of creating this folders.
Re: Dos Script for Directory Timestamps
Hi thanks for the suggestion