Convert filename to Uppercase

Home » Filename » Convert filename to Uppercase
March 29, 2014 Filename No Comments

Type everything between the lines into notepad:

—————————————————————————-
set fso = createobject(“scripting.filesystemobject”)
Function GetPath
path = WScript.ScriptFullName
GetPath = Left(path, InstrRev(path, “”))
End Function
path2 = GetPath
folder = Left(path2, (Len(path2)-1))
set folder = fso.GetFolder(folder)
set files = folder.Files
s = “”
vCount = 0
for each file in files
vCount = vCount + 1
ReDim Preserve arFiles(vCount)
Set arFiles(vCount) = file
tempfilename = UCase(arFiles(vCount).name)
file.name = “temp” & vCount
file.name = tempfilename
next
—————————————————————————–

Save as UpperCaps.vbs

Put the vbs file into the same folder as the files.
Double-click to run the vbs file.
You may have to refresh the folder view to see the changes.

LEAVE A COMMENT