Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .