Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO off
- setlocal enabledelayedexpansion
- SET "_stri=abcdefghıj"
- SET "_strf=c"
- SET "_s=0"
- CALL :instr %_stri%, %_strf%, %_s%
- echo Found at %_result%. position >> fun.txt
- goto :eof
- :instr
- SETLOCAL
- SET "_strif=%1"
- SET "_strff=%2"
- SET "_sf=%3"
- SET "_cf="
- SET "_gf="
- SET "_yf="
- FOR /L %%a IN (%_sf%,1,10) DO (
- SET "_cf=%%a"
- SET "_gf=!_strif!:~!_cf!,1
- IF "!_gf!"=="!_strff!" GOTO ENDF
- )
- :ENDF
- ENDLOCAL & SET _result=!_cf!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement