views:

182

answers:

1

Hi there,

I've accidentally copied a large part of a folder tree from my SVN working copy to my shared Windows web host via FTP.

The site is now littered with .svn directories and and I need some way of cleaning them. The only access I have to the server is via FTP, or by running a script on the server.

Does any one have a script which can be run remotely to remove the files over FTP from my development machine (any language Windows/Linux is fine) or a script in ASP, ASP.net or PHP I can run directly on the Windows server to remove these directories?

Thanks,

Tom

+1  A: 

How about:

for /f “tokens=* delims=” %%i in (’dir /s /b /a:d *svn’) do ( rd /s /q “%%i” )

taken from http://www.axelscript.com/2008/03/11/delete-all-svn-files-in-windows

also in regard to your statement further above try running it in php with the following

<?php
echo `for /f “tokens=* delims=” %%i in (’dir /s /b /a:d *svn’) do ( rd /s /q “%%i” )`;
?>
plod
Just about to try this - do you mean exec() rather than echo though?
Loftx
try both, i prefer echo because you "theoretically see the output the shell returns"
plod
Just got round to trying this and I can't seem to get it to work. I replaced the smart quotes with ' and " as described in the link but it just prints the string. When I use exec() or system() I see no effect at all.
Loftx