复制代码
- @echo off
- for /f "delims=" %%i in ('dir /b /a-d *.txt') do dos2unix "%%i"
- pause
复制代码
- @set @v=1 /*
- @echo off
- set "txtF="&set/p "txtF=拖入一个简中编码(采用crlf换行符)的文本文件:"
- if not defined txtF exit/b
- (cscript.exe /e:javascript "%~f0" %txtF%)
- set "outF=%txtF%.new"
- if exist %outF% (explorer.exe /select, %outF%)
- exit/b
- */
- var v = WSH.arguments;
- var fso= new ActiveXObject('scripting.filesystemobject');
- var fp = fso.opentextfile(v(0)), all = fp.readall();
- fp.close(); fp = fso.opentextfile(v(0)+'.new', 2, true);
- fp.write(all.replace(/\r\n/g, '\n')); fp.close();
- WSH.quit();
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |