删除svn版本信息

编写js程序:

 

 

if (WScript.Arguments.length == 0) {
	WScript.Echo("请输入参数!");
	WScript.quit();
} else {
	var path = WScript.Arguments(0);
	var fso = new ActiveXObject("Scripting.FileSystemObject");
	var rootFolder = fso.getFolder(path);
	var folderList = new Array();
	folderList.push(rootFolder);

	var folder, fc;
	while (folderList.length > 0) {
		folder = folderList.pop();
		fc = new Enumerator(folder.SubFolders);
		while (!fc.atEnd()) {
			if (fc.item().name == ".svn") {
				fso.deleteFolder(fc.item().path, true);
			} else {
				folderList.push(fc.item());
			}
			fc.moveNext();
		}
	}
	WScript.Echo("完成!");
}

 

 

随意命名为delsvn.js,在cmd窗口执行:

 

cscript.exe E:\svn\删除svn版本信息\delsvn.js E:\learning_demo\CHEHR

 其中E:\svn\删除svn版本信息\delsvn.js为文件所在路径,E:\learning_demo\CHEHR为需要删除svn版本信息的目录。确定执行,

你可能感兴趣的:(SVN)