简体   繁体   中英

windows batch script to svn delete set of folders

Suppose there are 15 folders committed in svn (each name starting with folder_ ).
How can I run svn delete on all the folders which were created on or before a specific date?

Thanks in advance.

Regards,
Rohan

I found this that might help you in your quest. Its not svn delete but it will get the job done. Batch file to delete files older than N days

If you want to delete all sub folders named .svn then create batch file with this content:

for /f "tokens=* delims=" %%i in ('dir /s /b /a:d *.svn') do (
rd /s /q "%%i"
)

save it in a file del_All_Dot_SVN_Folders.cmd . Run it. Your done.

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

Remember the above code has .svn whereas the code in the link has only *svn so its better to have the .svn to not accidentally have undesired effect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM