Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Backing up work folder

Hi all,

Just wondering how I can back up a complete directory folder containing all
the .xls files I have. I have setup a macro that save certain file and back
them up but I would like to have the complete file copied and saved into
H:\backup\with today's date as the folder name.

Is there anyway to do this?

Thanks

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Backing up work folder

Try:

Private Declare Function MakeSureDirectoryPathExists Lib "imagehlp.dll"
(ByVal lpPath As String) As Long
Sub xx()
targetfolder = "c:\ajay\back\"
MakeSureDirectoryPathExists targetfolder
Set fso = CreateObject("Scripting.FileSystemObject")
For Each file In fso.getfolder("c:\ajay").Files
Select Case fso.getfile(file.Path).Type
Case "Microsoft Excel Worksheet"
fso.getfile(file.Path).Copy targetfolder
End Select
Next
set fso = nothing
End Sub


"Greg B..." wrote:

Hi all,

Just wondering how I can back up a complete directory folder containing all
the .xls files I have. I have setup a macro that save certain file and back
them up but I would like to have the complete file copied and saved into
H:\backup\with today's date as the folder name.

Is there anyway to do this?

Thanks

Greg



Reply
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
work books only reference sheets in same folder... excel-chump[_2_] Excel Discussion (Misc queries) 0 October 15th 07 03:42 PM
backing up joesf16 Excel Discussion (Misc queries) 4 September 16th 07 01:15 PM
Backing up folder dan Excel Discussion (Misc queries) 4 July 21st 06 04:16 AM
How can I get my Favorites Folder and get it to work again? Jennifer Setting up and Configuration of Excel 2 April 27th 06 10:22 PM
Backing Up Greg B Excel Worksheet Functions 7 March 4th 05 03:45 PM


All times are GMT +1. The time now is 08:21 AM.

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

About Us

"It's about Microsoft Excel"