ASP FileSystemObject

i'd like to shoot it

Page 1 of 1

1 Replies - 7515 Views - Last Post: 14 April 2002 - 02:54 PM Rate Topic: -----

#1 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

ASP FileSystemObject

Posted 14 April 2002 - 02:22 PM

alright, this is driving me insane.

All I want to do is rename a folder.
So, since there's no Rename method, I'm using CopyFolder instead and then deleting the original (I tried MoveFolder but couldn't get it to work either).

Like this:

old_path = "/home/sites/site14/web/artists/test/*"
new_path = "/home/sites/site14/web/artists/test1/"

Set folder = fso.CreateFolder(new_path) Set folder = nothing fso.CopyFolder old_path, new_path fso.DeleteFolder old_path, True

This copies over only subfolders, and not files contained in the folder. This is the *best* I've come up with, having played with a number of variations on the path names (wildcards, /'s, etc).

What am I missing???


Is This A Good Question/Topic? 0
  • +

Replies To: ASP FileSystemObject

#2 klewlis  Icon User is offline

  • cur tu me vexas?

Reputation: 8
  • View blog
  • Posts: 1,723
  • Joined: 09-November 01

Re: ASP FileSystemObject

Posted 14 April 2002 - 02:54 PM

ok I worked around it like this:

old_path = "/home/sites/site14/web/artists/test/*"
new_path = "/home/sites/site14/web/artists/test1/"  

Set folder = fso.CreateFolder(new_path) Set folder = nothing fso.MoveFile old_path, new_path fso.MoveFolder old_path, new_path old_path = Replace(old_path, "/*", "") fso.DeleteFolder old_path, True

but if anyone knows of a nicer way, please let me know...

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1