Reputation: 453
I would like to rar a folder but exclude a certain of folders and all the files beneath them - the .svn folder.
How could I make this happen using the rar console command (rar.exe)?
Upvotes: 2
Views: 4373
Reputation: 31
I tried the following and it worked for me:
RAR a -ehs -x*\.svn\* -r
Upvotes: 3
Reputation: 453
Using a batch file:
1) dir /b /s /a .sv? > svn.lst
2) for /f \"tokens=* delims=\" %%i in ('dir /s /b /a:d *svn') do (dir /b /s /q \"%i\") >> svn.lst
3) rar a [email protected] myarchive [files....]
These three lines has to be in a .bat file.
Upvotes: 0
Reputation: 453
The final working version, three steps involved:
(1) dir /b /s /a .sv? > svn.lst
(2) rar.exe a -r [archive name] . -xsvn.lst [email protected]
(3) del svn.lst
Upvotes: 0
Reputation:
You have to include the fully qualified path and it's substructures. The path has to be canonical.
popdir %mypath%\.svn
set _=%cd%
pushdir
rar a -x%_% -x%_%\* myarchive
Upvotes: 0
Reputation: 1254
You could do an svn export, then you wouldn't have the .svn folders in the first place.
Upvotes: 1