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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding dates to an existing filename

Status
Not open for further replies.

k33

Technical User
Apr 10, 2003
20
0
0
US
I have a vbscript that checks one file and pulls any data out of that file into a new file and adds the current date to the filename. If the files are not downloaded everyday, the date needs to be modified to show the date range of the files. example: c:\test file\20030525-20030528.
Any suggestions on how to easily accomplish this. Thanks.
 
If you are using the file object contained within the scripting librabry the file object has a property called DateCreated. You can use this property as you are looping through the files to get the min and max dates of your range and then apply then to the end of you file name.
 
I am working on your suggestion, thanks. However, the DateCreatedObject also includes the time. Is it possible to have it only display the date?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top