CoverYourASP --> Snippets

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
44 active users
1380 visitors today
1224 pages today
(only part of today)
Tools I use

Copyright © 1999-2016 James Shaw.
All rights reserved.

RSS submissions

Now open source with SourceForge!

"Snippets" are mini-articles - they allow me to very quickly add answers to your frequently asked questions, and add brief explanations for topics that you've searched for without success. So, everytime you send an email or perform a search, chances are a new snippet will be the result!

9 Oct: Q&A;: How do I rename a local file using ASP?

Paul: You should do something that shows people how to rename files...

I'm actually looking for a script that shows me how to rename local files... Which seems like an impossible task to say the least! :)


Unfortunately, it is impossible to rename a file using the FileSystemObject!

To have the same effect you are forced to use the CopyFile method to create the new filename, then DeleteFile to delete the old one.

The same is true with FTP too - there is no way to rename over FTP (although some FTP programs may make it look possible).

Featured sponsor
My favorite resources

New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!