+ Reply to Thread
Results 1 to 2 of 2

Backing up work folder

Hybrid View

  1. #1
    Greg B...
    Guest

    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. #2
    AA2e72E
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1