本帖最后由 pcl_test 于 2016-7-9 21:54 编辑
纯路过- //&cls&dir /a-d/b *.txt|cscript -nologo -e:jscript "%~f0"&pause&exit
-
- var fso = new ActiveXObject('Scripting.Filesystemobject');
- function RandSort(file){
- var f = fso.OpenTextFile(file, 1);
- try{var txt = f.ReadAll().split(/\r\n/).sort(function(){return Math.random()-.5}).join('\r\n');}
- catch(e){}
- f.Close();
- fso.OpenTextFile(file, 2).Write(txt);
- }
- while(!WSH.StdIn.AtEndOfStream)RandSort(WSH.StdIn.ReadLine());
- WSH.echo('Done');
复制代码
|