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!

Rename files using VBScript

Status
Not open for further replies.

staann56

IS-IT--Management
Sep 28, 2004
24
US
I have a directory with files named as such:

filename_2007_63.pdf

Is there a way to strip off the _2007_63 part of the file name leaving just filename.pdf using VBScript?

thanks,
Stan
 
Sure. Search for FileSystemObject and Rename and you should find examples.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Is Name As available in VBS?

Never knock on Death's door: ring the bell and run away! Death really hates that!
 
Nope.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top