Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am using Ron de Bruin's code to copy a folder, which works fine when I specify a drive letter as below. As some of our users have the destination mapped as various other letters, I'd like to use the IP address of the destination drive (10.11.70.190) instead. How is this done - my attempts have only led to error 76, Path not found? Sub Copy_Folder() Dim FSO As Object Dim FromPath As String Dim ToPath As String FromPath = "X:\ACCOUNTS-EAST\New MA Project" ToPath = "S:\TEMA-01" If Right(FromPath, 1) = "\" Then FromPath = Left(FromPath, Len(FromPath) - 1) End If If Right(ToPath, 1) = "\" Then ToPath = Left(ToPath, Len(ToPath) - 1) End If Set FSO = CreateObject("scripting.filesystemobject") If FSO.FolderExists(FromPath) = False Then MsgBox FromPath & " doesn't exist" Exit Sub End If FSO.CopyFolder Source:=FromPath, Destination:=ToPath MsgBox "You can find the files and subfolders from " & FromPath & " in " & ToPath End Sub Thanks Martyn -- Excel 2000, Windows 2003 over Citrix PS4 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change link path when open destination file | Excel Worksheet Functions | |||
Remove end folder from path found with ThisWorkbook.Path command ? | Excel Programming | |||
How to List the names of the subfolders present in the folder (path of folder is given in the textbox by user ) | Excel Programming | |||
Change Hyperlink Destination Folder | Excel Discussion (Misc queries) | |||
Get Folder Path | Excel Programming |