Advertisement
Guest User

Untitled

a guest
Apr 6th, 2014
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. @echo off
  2. SetLocal DisableDelayedExpansion
  3. For /F %%# In ('"Prompt;$H&For %%# in (1) Do Rem"') Do Set "BS=%%#"
  4. Set "Line="
  5. <Nul set/p="%~2"
  6. :HILoop
  7. Set "Key="
  8. For /F "delims=" %%# In (
  9. 'Xcopy /L /W "%~f0" "%~f0" 2^>Nul'
  10. ) Do If Not Defined Key Set "Key=%%#"
  11. Set "key=%Key:~-1%"
  12. SetLocal EnableDelayedExpansion
  13. If Not Defined Key Goto :HIEnd
  14. rem If ^"==^%Key% Set "Key=0x22"
  15. If %BS%==^%Key% (
  16. Set /P "=%BS% %BS%" <Nul
  17. Set "Key="
  18. If Defined Line set/a length-=1& Set "Line=!Line:~0,-1!"
  19. ) Else set/a length+=1&Set /P "=*" <Nul
  20. If Not Defined Line (
  21. EndLocal& Set/a length=1& Set "Line=%key%"
  22. ) Else For /F delims^=^ eol^= %%# In ("!Line!") Do (
  23. EndLocal& Set/a length=%length%& Set "Line=%%#%Key%"
  24. )
  25. Goto :HILoop
  26.  
  27. :HIEnd
  28. if not defined Line set/a length=0
  29. echo(
  30. if not "%~1"=="" (
  31. For /F delims^=^ eol^= %%# In ("!Line!") Do (
  32. EndLocal&EndLocal&(If not "%~3"=="" Set "%~3=%length%")& Set "%~1=%%#" %length
  33. )
  34. ) Else (
  35. For /F delims^=^ eol^= %%# In ("!Line!") Do (
  36. EndLocal&EndLocal&(If not "%~3"=="" set "%~3=%length%")& Set "Pass=%%#" %length
  37. )
  38. )
  39. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement