New
#1
Split a txt file \n ?
want to split a txt file.First i open the txt file with notepad++ and i change from this \r\n to this \n , then i want to split them in 1o pieces and for that i use a tool called split or joinand also this script and when i check them i see are \r\n\ again.How to split a txt file \n and keep same \n ?
thanks guys
ur the besttt
Code:@ECHO OFF SETLOCAL SET "sourcedir=C:\Documents and Settings\Admin\Desktop\split files" SET /a fcount=100 SET /a llimit=10000 SET /a lcount=%llimit% FOR /f "usebackqdelims=" %%a IN ("%sourcedir%\list.txt") DO ( CALL :select FOR /f "tokens=1*delims==" %%b IN ('set dfile') DO IF /i "%%b"=="dfile" >>"%%c" ECHO(%%a ) GOTO :EOF :select SET /a lcount+=1 IF %lcount% lss %llimit% GOTO :EOF SET /a lcount=0 SET /a fcount+=1 SET "dfile=%sourcedir%\file%fcount:~-2%.txt" GOTO :EOF