Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi I received this code from Bob Phillips and it does what I want except it
copies everything I want to the "I drive" it makes a folder with today's date. What I need it to do is actually copy all the items into the directory with today's date. '--------------------------------------------------------------------------- Sub CopyFolder() '--------------------------------------------------------------------------- Dim oFSO As Object Dim sFolder As String Set oFSO = CreateObject("Scripting.FileSystemObject") sFolder = "I:\backup\" If Not oFSO.FolderExists(sFolder) Then MkDir sFolder & Format(Date, "yyyy-mm-dd") End If If Not oFSO.FolderExists(sFolder & Format(Date, "yyyy-mm-dd")) Then MkDir sFolder & Format(Date, "yyyy-mm-dd") End If oFSO.CopyFolder "C:\idsc\*", sFolder & "\" Set oFSO = Nothing End Sub Thanks again Greg |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Backing Up | Excel Discussion (Misc queries) |