Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Convert file names to upper case (Read 5597 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Convert file names to upper case
14.09.06 at 11:15:04
Today I needed to convert files to upper case. I need to do this regularly now so I thought it was best to write a small VBS for it. Here is the code for it.
Just copy and paste the following code into a text file and call it UCase.vbs (you can give it any name actually).  
When you drop one or more files onto the vbs it will convert the files to upper case. Note that you need to refresh in windows explorer to make it recognise the new names.
Dim args
Dim fleFile
Dim fso
Dim l

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

Set args = WScript.Arguments

If (args.count>0) Then
	For l = 0 to args.Count - 1
		Set fleFile = fso.GetFile(args(l))
		fleFile.Name = UCase(fleFile.Name) & ".tmp"
		fleFile.Name = Left(fleFile.Name,Len(
End If

Back to top
« Last Edit: 14.09.06 at 11:15:29 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1