Is it possible to do it?

  • Hello,

    This is not about SQL so I am posting it here.

    Is it possible to have a batch file which takes all important files on your computer, makes a ZIP archive (password-protected) and uploads that archive to a server?

    It would be nice if the list of "important files" could be a .txt read by the batch file, but not absolutely necessary, ok to be hardcoded in the batch file.

    There are around 10 "important files", which change daily. I need to do it exactly like I described (batch file --> ZIP --> server) so pls don't suggest other ways to back up data, like tape backup etc.

    Thank you!

  • I would say yes, this is quite possible. Take a look at PowerShell. I am assuming that even if the files may change the directories where they reside won't, so that shouldn't be a problem.

  • Get a copy of 7-Zip so you can do the zipping at the command line level. You won't even need to bother Powershell for this part.

    For uploading, it depends on what your target is. Is it an FTP server, a remote domain, or ??? If it's just a server on the same domain, then you'd only need to create a "share" to that server and copy the resulting zip file to that "share". I suppose you could use something like RoboCopy to restart failed copies but I believe that may be overkill in this case.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply