Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date file/Folder added to Server 1

Status
Not open for further replies.

aarondewberry

IS-IT--Management
Jul 20, 2005
148
GB
All

I am looking to find the date a file/folder was added to a server.

So for instants... if i created a folder on my desktop back on Jan 1st. Then that would be shown as the date 'Created'. If I move the folder to one of our LAN servers today, I want to be able to see todays date, somewhere....
Is there any way of doing this?
 
The date a file or folder was created or modified is easy enough to get using a VBScript. If that is an option for you then please post this in the VBScript forum, and we can help you with it there.

Are you just wanting to know when something was created, or are you trying to detect that something was moved?
How often do you need to do this?
Does it need to run automatically?
Where do want to see the results?
 
Thanks for the response NWBeaver...

The date I am after is the date I add a file/folder to the server. So if we go back to my example.. if I created a folder on my desktop on 1st Jan 09, and i added the folder to the LAN server today, then i'd want to see todays date (added to server date, if you like). Obviously this folder will be modified in the server, tomorrow, the next day etc.. but I still would only want to pull the date I added this folder to the server (today)
I only need to do this once against our LAN server to see when all the folders/files were added to it. The results can be anything from .txt to .xls.
 
You might want to take a look at using something like Log Parser, it is a program that you can download free from Microsoft. One of it's uses is to extract file information such as you are asking about.

When you install and run it, it will bring up a command prompt, type a string such as this:

LogParser -i:FS "SELECT * INTO report.csv From C:\*.* WHERE Attributes LIKE 'D%' ORDER BY CreationTime DESC" -o:CSV -recurse:0

This particular string will generate a .csv file listing all the folders in the root directory c:\, and sort them by the creation time.
You can then open the .csv file with Excel, for example.

It works pretty well, and it's free.
 
LogParser can also be run from a script, rather than having to open a command prompt and type in a long command string such as the one above.
Make a new post in the VBScript Forum if you want to know more about that option, and I can give you an example script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top