ajetrumpet
Banned
- Local time
- Today, 05:44
- Joined
- Jun 22, 2007
- Messages
- 5,638
all,
i'm trying to rename my files, and the vbProperCase is not capitalizing the first word in the filename. is it not supposed to? I think it is supposed to, as it works on other folders where I use it. It works with strconv(), but when renaming files with the function, doesn't seem to pick up the first word like it should. here's the code:
need a little boost. thanks!
i'm trying to rename my files, and the vbProperCase is not capitalizing the first word in the filename. is it not supposed to? I think it is supposed to, as it works on other folders where I use it. It works with strconv(), but when renaming files with the function, doesn't seem to pick up the first word like it should. here's the code:
PHP:
Function t()
On Error Resume Next
Dim StopTime As Variant, start As Variant
Dim ie As Object
Dim address As String
Dim fs, f, f1, fc, s, oFile, folderspec
Dim oldname As String
Dim newname As String
folderspec = "C:\Users\ajetrumpet\Adam's Files\WebSite Files\"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(folderspec)
Set fc = f.Files
For Each f1 In fc
oldname = folderspec & f1.Name
newname = StrConv(folderspec & f1.Name, vbProperCase)
Name oldname As newname
Next
Set f = Nothing
Set fc = Nothing
Set fs = Nothing
End Function