LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default Copy a folder by macro

I'm a bit of a backup fanatic, and realised that I can auyomate most of my
backups by macro, which is great. The only problem is that the help in VB is
too damn general for a novice. It just says FileSystemObject.Copyfolder, but
doesn't tell you how to express a FilesystemObject. I can successfully copy
files so I modified the code, and of course it doesn't work! I used:


Sub BACKUP_CENTRAL_DATA()
Dim SourceFolder, DestinationFolder
SourceFolder = "C:\0. CENTRAL DATA\"
DestinationFolder = "C:\99. BACKUPS\0. CENTRAL DATA\"
FileCopy SourceFolder, DestinationFolder
End Sub

Can someone help me on this simple one please?

Also I note that when I try to copy some of the files it says permission
denied. The files are as follows:

SourceFile = "blah blah\Application
Data\Microsoft\Excel\XLSTART\PERSONAL.xls"
SourceFile = "blah blah\My Documents\New Settings File.OPS"
SourceFile = "blah blah\Application Data\Microsoft\Outlook\Outlook.NK2"
SourceFolder = "blah blah\bgregory.DFS.000\Cookies\"
SourceFolder = "blah blah\Favorites\"
SourceFolder = "blah blah\Start Menu\"

I didn't run the code from PERSONAL.XLS

Thanks in advance. Brett
 
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
Macro to create a folder and copy files GainesvilleWes New Users to Excel 2 February 26th 07 06:33 PM
Copy a folder and objects John New Users to Excel 1 July 1st 06 10:00 AM
save a backup copy in different folder GT Excel Discussion (Misc queries) 3 May 11th 06 07:36 PM
Macro to copy range from Excel files in folder nc Excel Discussion (Misc queries) 1 June 15th 05 11:11 AM
Copy files from spreadsheet into folder Intotao Excel Discussion (Misc queries) 3 January 27th 05 11:38 PM


All times are GMT +1. The time now is 08:37 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"