Zip mdb using Batch File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • benyod79

    Zip mdb using Batch File

    I'm hoping someone will be able to assist with this one. Using a scheduling
    program I'd like to run a batch file that runs a macro to creat e a copy of
    the opened database. Then, using batch again, Zip that copied file to the
    same directory location and delete the copied file.

    The ultimate goal here is to create small sized back ups of the original
    database. I have the first part (creating the copy mdb) working great. It's
    zipping that copy that's giving me issues.

    Any thoughts or suggestions is much appreciated!

    Thanks
  • Wayne Morgan

    #2
    Re: Zip mdb using Batch File

    You will need a DOS based (command line) zip utility. Once you have that,
    use the command line recommended by the maker of the utility. If you have
    WinZip, they have a free command line add-on. There are others.

    --
    Wayne Morgan
    MS Access MVP


    "benyod79" <u23098@uwe> wrote in message news:61dd747206 000@uwe...[color=blue]
    > I'm hoping someone will be able to assist with this one. Using a
    > scheduling
    > program I'd like to run a batch file that runs a macro to creat e a copy
    > of
    > the opened database. Then, using batch again, Zip that copied file to the
    > same directory location and delete the copied file.
    >
    > The ultimate goal here is to create small sized back ups of the original
    > database. I have the first part (creating the copy mdb) working great.
    > It's
    > zipping that copy that's giving me issues.
    >
    > Any thoughts or suggestions is much appreciated!
    >
    > Thanks[/color]


    Comment

    • usddcm@yahoo.com

      #3
      Re: Zip mdb using Batch File



      Free command zip utility. Use it all the time to do exactly what your
      looking to do except I do it in vbscript.

      Wayne Morgan wrote:[color=blue]
      > You will need a DOS based (command line) zip utility. Once you have that,
      > use the command line recommended by the maker of the utility. If you have
      > WinZip, they have a free command line add-on. There are others.
      >
      > --
      > Wayne Morgan
      > MS Access MVP
      >
      >
      > "benyod79" <u23098@uwe> wrote in message news:61dd747206 000@uwe...[color=green]
      > > I'm hoping someone will be able to assist with this one. Using a
      > > scheduling
      > > program I'd like to run a batch file that runs a macro to creat e a copy
      > > of
      > > the opened database. Then, using batch again, Zip that copied file to the
      > > same directory location and delete the copied file.
      > >
      > > The ultimate goal here is to create small sized back ups of the original
      > > database. I have the first part (creating the copy mdb) working great.
      > > It's
      > > zipping that copy that's giving me issues.
      > >
      > > Any thoughts or suggestions is much appreciated!
      > >
      > > Thanks[/color][/color]

      Comment

      • benyod79 via AccessMonster.com

        #4
        Re: Zip mdb using Batch File

        Thank you both for your replies. Being somewhat new at DOS, the command line
        utility's link was a bit overwhelming and I couldn't figure out what to
        download. So after a few valliant, but unfruiful attempts, I chose to look at
        WinRar's command line downloads (my zipping program). I'm still not getting
        the results I'm looking for. The batch file I created is returning an error.
        Here's exactly what I have so far all on one line:

        "C:\Program Files\WinRAR\Wi nRaR.exe" "C:\Documen ts and Settings\Owner\ My
        Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.mdb" "C:\
        Documents and Settings\Owner\ My Documents\Open Projects\Human Resources\DB
        Backup\Backup_o f_HR_06-16.rar"

        I'm getting this error message: No files selected. You need to select files
        for this operation.

        Any thoughts on this? Should I scrap the idea using WinRar and just use a
        Windows Zipping utility?

        Thanks for the help.





        usddcm@yahoo.co m wrote:[color=blue]
        >http://www.info-zip.org/
        >
        >Free command zip utility. Use it all the time to do exactly what your
        >looking to do except I do it in vbscript.
        >[color=green]
        >> You will need a DOS based (command line) zip utility. Once you have that,
        >> use the command line recommended by the maker of the utility. If you have[/color]
        >[quoted text clipped - 19 lines][color=green][color=darkred]
        >> >
        >> > Thanks[/color][/color][/color]

        --
        Message posted via AccessMonster.c om

        Comment

        • Wayne Morgan

          #5
          Re: Zip mdb using Batch File

          I looked at the WinRar help file to get the correct command line, try:

          "C:\Program Files\WinRAR\Wi nRaR.exe" a "C:\Documen ts and Settings\Owner\ My
          Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.rar"
          "C:\Documen ts and Settings\Owner\ My Documents\Open Projects\Human
          Resources\DB Backup\Backup_o f_HR_06-16.mdb"

          --
          Wayne Morgan
          MS Access MVP


          "benyod79 via AccessMonster.c om" <u23098@uwe> wrote in message
          news:6206d88bd8 4eb@uwe...[color=blue]
          > Thank you both for your replies. Being somewhat new at DOS, the command
          > line
          > utility's link was a bit overwhelming and I couldn't figure out what to
          > download. So after a few valliant, but unfruiful attempts, I chose to look
          > at
          > WinRar's command line downloads (my zipping program). I'm still not
          > getting
          > the results I'm looking for. The batch file I created is returning an
          > error.
          > Here's exactly what I have so far all on one line:
          >
          > "C:\Program Files\WinRAR\Wi nRaR.exe" "C:\Documen ts and Settings\Owner\ My
          > Documents\Open Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.mdb"
          > "C:\
          > Documents and Settings\Owner\ My Documents\Open Projects\Human Resources\DB
          > Backup\Backup_o f_HR_06-16.rar"
          >
          > I'm getting this error message: No files selected. You need to select
          > files
          > for this operation.
          >
          > Any thoughts on this? Should I scrap the idea using WinRar and just use a
          > Windows Zipping utility?
          >
          > Thanks for the help.
          >
          >
          >
          >
          >
          > usddcm@yahoo.co m wrote:[color=green]
          >>http://www.info-zip.org/
          >>
          >>Free command zip utility. Use it all the time to do exactly what your
          >>looking to do except I do it in vbscript.
          >>[color=darkred]
          >>> You will need a DOS based (command line) zip utility. Once you have
          >>> that,
          >>> use the command line recommended by the maker of the utility. If you
          >>> have[/color]
          >>[quoted text clipped - 19 lines][color=darkred]
          >>> >
          >>> > Thanks[/color][/color]
          >
          > --
          > Message posted via AccessMonster.c om
          > http://www.accessmonster.com/Uwe/For...ccess/200606/1[/color]


          Comment

          • benyod79 via AccessMonster.com

            #6
            Re: Zip mdb using Batch File

            Thank you so much. That works beautifully. I'll try to follow your lead to
            complete the rest of the code.




            Wayne Morgan wrote:[color=blue]
            >I looked at the WinRar help file to get the correct command line, try:
            >
            >"C:\Program Files\WinRAR\Wi nRaR.exe" a "C:\Documen ts and Settings\Owner\ My
            >Documents\Op en Projects\Human Resources\DB Backup\Backup_o f_HR_06-16.rar"
            >"C:\Document s and Settings\Owner\ My Documents\Open Projects\Human
            >Resources\DB Backup\Backup_o f_HR_06-16.mdb"
            >[color=green]
            >> Thank you both for your replies. Being somewhat new at DOS, the command
            >> line[/color]
            >[quoted text clipped - 34 lines][color=green][color=darkred]
            >>>> >
            >>>> > Thanks[/color][/color][/color]

            --
            Message posted via AccessMonster.c om

            Comment

            Working...