本帖最后由 pcl_test 于 2015-10-31 23:20 编辑
- //&cls&cscript -nologo -e:jscript "%~f0" "测试.txt"&pause&exit
- var fso = new ActiveXObject('Scripting.FileSystemObject');
- var file = fso.OpenTextFile(WScript.Arguments(0),1);
- var txt = file.ReadAll().replace(/\s+$/,'');
- fso.CreateTextFile('new_'+WScript.Arguments(0),2).Write(txt);
复制代码
|