I need to remove all files and folders from a particular parent folder except those which have .svn as the foldername and those which have *.svn-base as their filename.
Is there a Windows script that can do this for me?
Edit1
@Mizo - your solution returned the following while wiping out everything:
C:\temp>clean-all-except-svn.bat
File not found - *.svn_base
0 File(s) copied
0 File(s) copied
I had changed the clean.bat reference in the file itself.
Edit2
I fixed the typo as follows but still the same error
XCOPY /Q /Y *.svn-base __cltmp
C:\temp>clean-all-except-svn.bat
File not found - *.svn-base
0 File(s) copied
0 File(s) copied
Edit3
(a) It keeps prompting me
Confirm
The item at C:\temp\f\a\d has children and the Recurse parameter was not specified. If you continue,
all children will be removed with the item. Are you sure you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
(b) It displays THOUSANDS of messages like:
At line:1 char:86
+ get-childitem C:\temp\ -exclude *.svn-base,".svn" -recurse | foreach ($_) {remove-item <<<< $_.fullname}
+ CategoryInfo : PermissionDenied: (change_email.php.svn-base:FileInfo) [Remove-Item], IOException
+ FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
Remove-Item : Cannot remove item C:\temp\admin\.svn\text-base\change_email_submit.php.svn-base: Not Enough permission to
perform operation.
