本帖最后由 pcl_test 于 2015-3-8 19:19 编辑
回复 10# 502283644
打乱txt内容- @echo off
- setlocal enabledelayedexpansion
- del /ah "%~n1" 2>nul
- for /f "delims=" %%a in ('type %1') do echo !random:~-1!#%%a >>"%~n1"
- attrib +h "%~n1"
- for /f "tokens=1* delims=#" %%b in ('type "%~n1" ^|sort') do echo %%c>>"%~n1.ini"
- pause
复制代码 还原ini为原txt- @echo off
- set "name=%~n1"
- for /f "tokens=1* delims=#" %%a in ('type "%name%"') do echo %%b>>"%~n1_还原.txt"
- del /ah "%~n1" 2>nul
- pause
复制代码
|