Friday, August 21, 2026

How to copy txt file from notepad to new notepad using bat file - batch file

 @echo off

title Steps Replayer

cls

echo Ready to replay steps. 

echo You have 5 seconds to click inside the app where you want to type!

echo.

timeout /t 5


:: This block creates a temporary script to simulate automated typing

echo Set wshShell = wscript.CreateObject("WScript.Shell") > replay.vbs


:: This reads your saved text file and writes it into the automated typer

for /f "delims=" %%x in (portalchanges.txt) do (

    echo wshShell.SendKeys "%%x" >> replay.vbs

    echo wscript.sleep 500 >> replay.vbs

    echo wshShell.SendKeys "{ENTER}" >> replay.vbs

    echo wscript.sleep 500 >> replay.vbs

)


:: This runs the automatic typing script and then deletes the temporary file

cscript //nologo replay.vbs

del replay.vbs


echo.

echo Replay complete!

pause


No comments:

Post a Comment