C dos deletes all. svn folders
1. Run the following command in the dos window:
For/r <path of your project> % I in (. svn) do rd/s/q % I II. Add the "delete svn folders" operation to the right-click menu.
Create a text file with a random name and suffix of. reg. The content is as follows:
View sourceprint? Windows registry editor version 5.00
[Hkey_local_machinesoftwareclassesfoldershelldeletesvn]
@ = "Delete svn folders"
[Hkey_local_machinesoftwareclassesfoldershelldeletesvncommand]
@ = "Cmd.exe/c" title removing svn folders in % 1 & color 9a & for/r "% 1" % f in (. svn) do rd/s/q "% f """
After saving the file, double-click the reg file. After successful, right-click each folder and a "delete svn folders" option will be displayed. Click this option to delete all. svn folders under this folder.
3. Compile js programs
The procedure is as follows:
Js code
1 if (wscript. arguments. length = 0) {2 wscript. echo ("Enter the parameter! "); 3 wscript. quit (); 4} 5 else {6 var path = wscript. arguments (0); 7 var fso = new activexobject ("scripting. filesystemobject "); 8 var rootfolder = fso. getfolder (path); 9 var folderlist = new array (); 10 folderlist. push (rootfolder); 11 12 var folder, fc; 13 while (folderlist. length> 0) {14 folder = folderlist. pop (); 15 fc = new enumerator (folder. subfolders); 16 while (! Fc. atend () {17 if (fc. item (). name = ". svn ") {18 fso. deletefolder (fc. item (). path, true); 19} 20 else {21 folderlist. push (fc. item (); 22} 23 fc. movenext (); 24} 25} 26 wscript. echo ("done! "); 27} Save the program as a file suffixed with. js, such as delsvn. js.
Run cscript.exe delsvn. js xxx
Example: cscript.exe c: userslhc1_topdelsvn. js e: union
C: userslhc1_topdelsvn. js: This js is placed on the desktop.
E: All. svn folders under union will be deleted.
Note the following when writing this js Code:
1. The output content uses wscript. echo () instead of alert ()
If you use alert (), an error is returned because alert () is a function of the browser (dom) and does not contain this function in Webpage effects.
2. executable js files
The following code is available:
Show sourceview sourceprint? 1 <job>
2
3 <script language = "javascript">
4
5 wscript. echo ("hello world! ");
6
7 </script>
8
9 </job>
Save this code as a. wsf file jstest. wsf and double-click it to run it, for example:
If wscript. echo ("hello world! "); This line of code is replaced with the program that deletes the. svn folder above. It can also be run. However, because this program requires parameters, it can be run in the following way:
Cscript c: userslhc1_topjstest. wsf e: union