Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Is it possible to do it? Expand / Collapse
Author
Message
Posted Sunday, November 18, 2012 7:35 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, June 21, 2013 9:07 PM
Points: 43, Visits: 317
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!
Post #1386044
Posted Sunday, November 18, 2012 9:10 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 9:11 PM
Points: 23,070, Visits: 31,598
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1386053
Posted Sunday, November 18, 2012 12:06 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:06 PM
Points: 36,786, Visits: 31,243
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1386083
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse