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

Rename Folder

Status
Not open for further replies.

PenguinHead

Programmer
Jan 5, 2007
18
US
I want to rename a folder. I've looked at the .Copyfolder and .Movefolder classes to try and rename it that way but it just doesn't work. So unless there is a flat out .Renamefolder class that I missed, I'm not sure where to go. Any ideas?
 
Did you try using the GetFolder method to get a copy of the folder object and then setting its Name property?
 
<%
Dim fso
Dim fld

Set fso = Server.CreateObject("Scripting.FileSystemObject")

'Call GetFolder using the current name:
Set fld = fso.GetFolder("c:\Blah")

'Set foldr object's Name property to new name:
fld.Name = "BlahBlah"

Set fld = Nothing
Set fso = Nothing
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top