Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- Setlocal Enabledelayedexpansion
- (
- echo;854/FLammrock
- echo;12/LOL
- echo;259/Salut
- echo;7458/Test
- echo;125/Oui
- echo;36/NANII
- )> myFile.txt
- call :sort myFile.txt
- pause&exit
- :sort <File>
- type nul > "%temp%\tempfile"
- for /f "tokens=1,2 delims=/" %%a in ('type "%~1"') do (
- set /a seq=1000000000+%%~a
- echo;!seq!/%%b
- )>>"%temp%\tempfile"
- type nul > "%~1"
- for /f "tokens=1,2 delims=/" %%a in ('sort "%temp%\tempfile"') do (
- set /a seq=%%~a-1000000000
- echo;!seq!/%%b
- )>>"%~1"
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement