?
Solved

Change the folder names to the right format

Posted on 2007-11-21
4
Medium Priority
?
197 Views
Last Modified: 2010-03-05
Hi,

Change all the folders name to the right format.
Each word should start with a Caps.
Change any type of folder names to clear format.
SHARATH to be changed as Sharath
SHarath to be change to Sharath
Sharath reddy to be changed to Sharath Reddy

Any way of doing this for a folder and all sub folders within it.
Can a script or a tool do this
Regards
Sharath
0
Comment
Question by:bsharath
[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
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Basheerpt earned 1500 total points
ID: 20332834
0
 
LVL 11

Author Comment

by:bsharath
ID: 20332950
Thanks for the links but this software was hanging and had problems with it...I found this..
"Ftweak-Case.exe" Which works great....
0
 
LVL 25

Expert Comment

by:imitchie
ID: 20332975
be very careful.. some folders are special. you don't want to rename "Documents and Settings" to "Documents And Settings" for example.
BE VERY CAREFUL - create a temp folder and some subfolders to test.

change the last line to where you want to start
ShowSubfolders FSO.GetFolder("C:\temp\mytestfolder")

' modified from asp101.com
Function PCase(strInput)
	Dim iPosition
	Dim iSpace
	Dim strOutput
	iPosition = 1
	Do While InStr(iPosition, strInput, " ", 1) <> 0
		iSpace = InStr(iPosition, strInput, " ", 1)
		strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
		strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))
		iPosition = iSpace + 1
	Loop
	strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
	strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))
	PCase = strOutput
End Function
 
Set FSO = CreateObject("Scripting.FileSystemObject")
 
Sub ShowSubFolders(Folder)
    For Each Subfolder in Folder.SubFolders
        FSO.MoveFolder Subfolder.Path , PCase(Subfolder.Path)
        ShowSubFolders Subfolder
    Next
End Sub
 
ShowSubfolders FSO.GetFolder("C:\temp\mytestfolder")

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 20332982
Thanks i am just changing folders that ae created by me...
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

777 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