Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to write a simple backup script using rar.exe, the command line binary shipped with WinRAR. I want to fetch an entire folder from a network location and add it to a rar-file on my desktop computer.

How do I specify a network path as input?

My script looks like this (the network computer name I'm trying to access is Cube:

rar a "C:\test.rar" -mt4 -ag" yyyy-mm-dd" -m5 "\\Cube\foldername" I also tried with IP in the path, like this: \\192.168.xxx.xxx\foldername

Output tells me the path \\Cube\foldername can not be found.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Seems to be working with the following command:

rar a "C:\test.rar" -mt4 -ag" yyyy-mm-dd hh_MM_ss" -m5 -r "\\Cube\foldername\*.*

Same as above but with additions of -r and *.*.

share|improve this answer

A workaround could be mapping/mounting the network drive and using it as an ordinary drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.