Ok I'm not extremely good with explaining things, so I'm going to jump right into giving the example:
Here's what I'm trying to do:
Create a folder named "New" in the drive "C:".
Then in the "New" folder creat a .bat file called "New".
-In the same line of .bat (the same line as creating the .bat file called "New") add commands such as "echo GOOD NIGHT" then "shutdown /s /t 10 /c "Good Night!" by using the echo parrameter. Here's the .bat code. (for you to correct)
+ I'm ONLY USING *ONE* .bat file to do all of this.(Create folder name "New" and in that folder create a .bat file named "New" that has commands "echo GOOD NIGHT" and "shutdown /s /t 10 /c "Good Night!")
mkdir C:\New
echo echo GOOD NIGHT
shutdown /s /t 10 /c "Good Night!">>C:\New\New.bat
I know this works if I am just putting PLAIN TEXT (With no commands) into the .bat file in the new folder. But my problem is that when I try to "echo" the commands into the new .bat file it only exicutes them in the original .bat file!
Question
PVVnT(0)L
Ok I'm not extremely good with explaining things, so I'm going to jump right into giving the example:
Here's what I'm trying to do:
Create a folder named "New" in the drive "C:".
Then in the "New" folder creat a .bat file called "New".
-In the same line of .bat (the same line as creating the .bat file called "New") add commands such as "echo GOOD NIGHT" then "shutdown /s /t 10 /c "Good Night!" by using the echo parrameter. Here's the .bat code. (for you to correct)
+ I'm ONLY USING *ONE* .bat file to do all of this.(Create folder name "New" and in that folder create a .bat file named "New" that has commands "echo GOOD NIGHT" and "shutdown /s /t 10 /c "Good Night!")
I know this works if I am just putting PLAIN TEXT (With no commands) into the .bat file in the new folder. But my problem is that when I try to "echo" the commands into the new .bat file it only exicutes them in the original .bat file!
Edited by PVVnT(0)LLink to comment
Share on other sites
11 answers to this question
Recommended Posts