Prev Previous Post   Next Post Next
  #1   Report Post  
Greg B
 
Posts: n/a
Default Backing Up

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Backing Up Greg B Excel Discussion (Misc queries) 7 March 4th 05 03:45 PM


All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"