• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Winrar Command Line for Excluding a Directory

sachinkainth

Junior Member
Hi all,

I have a .bat file in which I have a Winrar command that zips up all the files in a particular folder (
Code:
C:\Data
). I want to zip all the files in this folder plus any files in any subfolders except that I want to exclude a particular subfolder (
Code:
C:\Data\Cobian\Logs
). Here is what my command looks like

Code:
WinRAR a -r -m0 -agYYYYMMDD C:\Users\Sachin\Desktop\ C:\Data -x*\C:\Data\Cobian\Logs -x*\C:\Data\Cobian\Logs\*

You can see that I have attempted to exclude the aforementioned subfolder by using the below option, but the attempted exclusion does not work. The rest of the command works.

Code:
-x*\C:\Data\Cobian\Logs -x*\C:\Data\Cobian\Logs\*
How can I correctly exclude the given folder?
 
Last edited:
What about?

Code:
-xData\Cobian\Logs
or
Code:
-x*Data\Cobian\Logs
or
Code:
-x*\Data\Cobian\Logs
or
Code:
-xC:\Data\Cobian\Logs
 
Back
Top