[dba-Tech] Renaming Windows Folders using code

Gustav Brock Gustav at cactus.dk
Thu May 20 10:04:27 CDT 2010


Hi Martin

Try with

  Name "mreid" As "M Reid"

or rather:

  Name "d:\path\mreid" As "d:\path\M Reid"

The new name can be build this way:

  strNew = UCase(Left(strOld, 1)) & " " & StrConv(Mid(strOld, 2), vbProperCase)

/gustav


>>> mwp.reid at qub.ac.uk 20-05-2010 16:32 >>>
Jon

I imported a load of SharePoint data from a backup and ended up with a folder structure based on site names which are first initial and surname.

eg
mreid
rreid
ereid

I need to loop over that structure and change the folder name to m reid, r reid etc

first letter space then surname

Martin





More information about the dba-Tech mailing list