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

Rename Files in 1 Directory

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
Looking for a vbscript to rename temp files in a specific directory. Have approx 100 files downloaded daily, I need to rename each 1 - 100 etc so the next days files don't overwrite each other.

Any help is appreciated.
 
get the vbscript documentation here:

and then lookup filesystemobject
there's a &quot;name property&quot; << search for this

object.Name [= newname]
Sets or returns the name of a specified file or folder. Read/write.

so all you have to do is

read the folder
cycle through the filenames
split names on '.'
alter the name
join together with extension
rename

===============
Security Forums
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top