I'm trying to rar some files with the WinRAR command line. The files have this structure:
Top-Level Dir
| Text1.txt
| Text2.txt
| XML1.xml
| XML2.xml
| Inner Dir
| | Inner1.txt
| | Inner2.txt
| | InnerXML1.xml
| | InnerXML2.xml
It's also possible for the Top-level Dir and the Inner Dir to have more subdirectories.
I can successfully rar the files and preserve the structure that I want, but I'm trying to exclude .xml files only from the top-level directory. I want my archive to look like this:
Top-Level Dir
| Text1.txt
| Text2.txt
| Inner Dir
| | Inner1.txt
| | Inner2.txt
| | InnerXML1.xml
| | InnerXML2.xml
I can only manage to remove .xml files from sub-directories of Top-level Dir
. Anything else I try removes all of them. I've tried a number of combinations of the following commands:
rar a -ep1 -x*.xml <destination> <source>
rar a -ep1 -x..\*.xml <destination> <source>
rar a -ep1 -r- -x*.xml <destination> <source>
rar a -ep1 -x*\..\*.xml <destination> <source>
I'm hoping that I just don't understand how specify the path correctly.
Help is appreciated.
Edit: I'm running a Windows machine.