Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Modifying local folder name...

Posted on 2004-09-28
6
Medium Priority
?
250 Views
Last Modified: 2013-11-13
Does anyone know how to go about changing the name of a folder using FSO? If not possible, is there an API available to do this?
0
Comment
Question by:wgyger12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Expert Comment

by:tusharashah
ID: 12172680
To rename folder you use MoveFolder procedure:

------------------------------------------------------------------------------------
Dim fso

Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.MoveFolder "C:\test1", "C:\test2"
Set fso = Nothing

------------------------------------------------------------------------------------

-tushar
0
 
LVL 4

Accepted Solution

by:
avi247 earned 2000 total points
ID: 12173313
0
 
LVL 1

Expert Comment

by:Sibish
ID: 12178883
Hi,

The easiest way to do this is to use the Name function. For example, you need to change the sam folder to sun, which is residing in the c:\ drive.

  Name "c:\sam" as "c:\sun"

This is so simple.
Try it out
0
 

Author Comment

by:wgyger12
ID: 12182076
Thanks AVI. I prefer to stay away from FSO if at all possible, and the API call seems to do the trick.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question