Network Drive as a Destination

Mar 14, 2014 at 2:42 PM
Thanks for a wonderful script!
I have one issue with it. If a set the destination as "\machine\share\" 7zip crashes and is unable to do the backup. Is there a way to make the backup locally and then send it to network location? I'm trying to run the script from task scheduler to automate the backup process...

Best regards,
Mar 14, 2014 at 2:54 PM
Edited Mar 14, 2014 at 2:55 PM
Hi MateuszM,
the behaviour you describe is strange. Nevertheless when 7zip starts it works independently from my script so I am not able to investigate the problem for you. I personally use it to directly save to a network share with no problems.

Anyway you can easily implement your own "late move" operation enclosing the launcher of the script into a batch file.
@Echo off
powershell 7zBackup.ps1 --type full --selection <whatever> --destpath <anylocaldestination>
if exist <anylocaldestination>\*.7z move <anylocaldestination>\*.7z \\yourserver\yourshare
Then you will want to schedule the batch file instead of the script itself.

Best regards.
Marked as answer by MateuszM on 3/14/2014 at 7:16 AM
Mar 14, 2014 at 3:16 PM
Thats a great idea. Thanks!

Best regards.