2011-03-25 21:09 questioner: wmdscjhdpy | Views: 1624 Times
Cmd How to modify the file. For example, I put a 123.txt in there, the content is 321, I want to do a cmd, let 123.txt inside 321 into 123, the code how to play.
and ... I want to let Cmd run the time to wait 10 seconds before running, OK. And then there's
. If I want the content of 123.txt to be set to cmd a variable value, code.
give the points correctly. Answer more points.
I'll help him answer the question. 2011-03-30 13:06
No, I don't think you're getting started
. One: Modify the file.
For example, your 123.txt file in the F-packing directory, no matter what content, input echo 123>f:\123.txt can be
">" command is the transmission command, but will overwrite the original content
two: This requirement can be completed, To use the character intercept command, first extract the computer time assignment to a variable (such as a), and then loop out the system time assignment to another variable (such as B), if the difference is 10, then run the specified program. I'm using this right now, but this code gives you no use, one is you do not understand, the second is that each person's computer time format is not necessarily the same, I just for my Computer time format do
three: I do not know what you are talking about the variables, want to complete what kind of work, So the code for your program I have no way to "aptitude", but no matter what variables can be, such as you want to save the value of variable A to the F root directory in the 123.txt, the code is:
echo%a%>f:\123.txt
Specific path you specify the line
Ask
The first one to understand, thank you the
second, I want to remember that there is an order called ping 127.0.0.1 <nul, it seems like this, the middle does not remember, later know is to test the network connection use, but it does can delay, give a code.
and the third is I'm going to set the value of the%a% to 123.txt content.
Reply
one. Oh, that's what you said. The code is as follows: ping/n a 127.1>nul format I will not say, I would say that you want to delay a few seconds to set a few (note unit can only be seconds) two. If you want to set the contents of a file to a, you can use the for command for/f%i in (f:\123.txt) do set a=%i This is the way to enter the command window directly, if you are creating a batch file, you should change%i to%%i.