Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @ECHO off
  2. setlocal enabledelayedexpansion
  3.  
  4. SET "_stri=abcdefghıj"
  5. SET "_strf=c"
  6. SET "_s=0"
  7. CALL :instr %_stri%, %_strf%, %_s%
  8. echo Found at %_result%. position >> fun.txt
  9. goto :eof
  10.  
  11. :instr
  12. SETLOCAL
  13. SET "_strif=%1"
  14. SET "_strff=%2"
  15. SET "_sf=%3"
  16. SET "_cf="
  17. SET "_gf="
  18. SET "_yf="
  19. FOR /L %%a IN (%_sf%,1,10) DO (
  20. SET "_cf=%%a"
  21. SET "_gf=!_strif!:~!_cf!,1
  22. IF "!_gf!"=="!_strff!" GOTO ENDF
  23. )
  24. :ENDF
  25. ENDLOCAL & SET _result=!_cf!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement