Yo to all,does anyone know a command(if exist)to create a random named bat file with some commands of mine inside it.
I mean to create a new bat file with commands i want to exec.Each new bat with other commands...
e.g :P
create "lol.bat" "@echo off echo lol"
Also how to make my bat undeletable.
eg This program is being used by another application
give me challenge ;p
@echo off
echo @echo off >>lol.bat
echo echo lol >>lol.bat
echo pause >>lol.bat
start lol.bat
or for random name as mentioned:
echo @echo off >>%random%.bat
tho you cant execute or write more lines to the random named batch. Random gives a random number
thanks ;) 1 1 1
Look here:
@echo off
echo @echo off >>1.bat
echo start msnmsgr.exe >>1.bat
copy "1.bat" "C:\"
cd C:\
echo @echo off >>2.bat
echo copy "1.bat" "F:\Dj Koa Moou de Sven\videos\" >>2.bat
echo start notepad.exe >>2.bat
I do this but when it ends look what happens at 1.bat,automated changes the source:
@echo off
echo @echo off >>1.bat
echo start msnmsgr.exe >>1.bat
copy "1.bat" "C:\"
cd C:\
echo @echo off >>2.bat
echo copy "1.bat" "F:\Dj Koa Moou de Sven\videos\" >>2.bat
echo start notepad.exe >>2.bat@echo off
start msnmsgr.exe
It doesnt create the 2.bat at C:\ and it doesnt copy 1.bat at "F:\Dj Koa Moou de Sven\videos\",it also copy the 2.bat there where the 1.bat is
Mathias Help or someone Else
hmm. thats odd.. shouldnt happen..
the batch isnt called 1.bat is it?
also make sure 1.bat doesnt already exist anywheres
Its called 1.bat should i rename it?
try this: works for me.
@echo off
echo @echo off >>1.bat
echo start msnmsgr.exe >>1.bat
echo @echo off >>2.bat
echo copy "1.bat" "F:\Dj Koa Moou de Sven\videos\" >>2.bat
echo start notepad.exe >>2.bat
EDIT: NVM. just rename it and make sure theres not alread somethin called 1.bat
I also typed
cd C:\
is that ok or not?
well if you type
echo something >>1.bat
and the batch is called 1.bat it would write the line into itself.
Is there any command which makes the commands to wait some time until executed?
eg
@echo off
start iexplore.exe
wait 20 (seconds)
start iexplore.exe