Excluding .svn Directories Using WinRar

I have a PowerShell script that I use to create distributions that copy compiled files from several places and fasten them to winrar. In the script, I go to the directory containing the folders that I want to run and execute this:

Invoke-Expression ($WinRAR + " a " + $zipPath + " " + $WinRARFilter + " " + $DistName + "-zip " + $WinRAROpts)

What actually accomplishes this:

E:\Progs\WinRar\WinRar.exe a C:\Users\Echilon\Documents\Coding\ResourceBlender-Express\trunk\dist\resourceblender-express_1.44-zip.zip -x*\.svn\* -x*\.svn -x\.svn resourceblender-express-zip -r -s -m5 -inul

However, none of the .svn directories are excluded from the zip file. This worked, and I have no idea why this is not, but I can not get it to exclude the necessary files.

The full script is on codeplex at http://resourceblender.codeplex.com/sourcecontrol/changeset/view/27742?projectName=resourceblender#45670 1 (at the bottom of the script)

Can someone with experience in PowerShell shed some light on this, please?

+3
source share
6 answers

I had the same problem solved with:

-x*.svn\

I am using WinRar v3.93 for Windows. Note the final backslash.

+12
source

The right way to do this is to run svn export , which will create a copy of the project without the .svn directories (and nothing else but the controlled version), and then zip it.

+11
source

svn export, . WinRar, -e (.svn - ) -ep .

. WinRar

+1

, , , Google, :

-x*\.svn\*
+1

PowerShell. BOOM!

winrar a -ehs -x*\.svn\* -u -r -afrar -m3 "dest file.rar" "source folder"
+1

-x*\.svn*

.svn, . WinRAR 3.80. winrar?

, svn , .dlls

-1

Source: https://habr.com/ru/post/1716077/


All Articles