chestera
asked on
Rename and Delete sub folders
Hi
I have folders on dropbox. as follows
C:\Users\Public\Dropbox\Cl ient\Direc tSales\Env irpPacific .
My question is how can I using vba change the name or delete the folder EnviroPacific
I can change a root folder name
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\Zmyfolder"
strNewDirName = "C:\Pfolder"
Name strOldDirName As strNewDirName
I get errors when I add Sub folders.
Any help would be appreciated
chestera
I have folders on dropbox. as follows
C:\Users\Public\Dropbox\Cl
My question is how can I using vba change the name or delete the folder EnviroPacific
I can change a root folder name
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\Zmyfolder"
strNewDirName = "C:\Pfolder"
Name strOldDirName As strNewDirName
I get errors when I add Sub folders.
Any help would be appreciated
chestera
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
many thanks feeling a bit foolish
ASKER
My apologies. With my example I got and error on the last line Name path not found although the path was or looked correct so I rewrote as follows
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\FolderA\FolderB"
strNewDirName = "C:\FolderA\FolderC\"
Name strOldDirName As strNewDirName
This time no problems. Must have been a glitch in my first attempt
I will split the points
Alan