How do you make a batch file send its results to a text file.?
106533
any.bat >output.txt 2>errors.txt\n\n(that would send the main stream output to 'output.txt' and if errors occur, reports will be sent to 'errors.txt')
880370
Ok I have a new and better Idea,... there is 2 parts to this....\n\nOpen up note pad and type the following\n\nshutdown /s /c "Time to go to bed"\n\n\nthen click file "save as"  then change "save as type:" to "all files".\nThen type in the following as the name...   "test01.bat"\n\nafter you created the file, then click...\nStart>Settings> Control Panel\n\nswitch to classic view, then go to Schedualed tasks...\n\nRight click the background, and select "new" then click "schedualed task"\n\nunder "Run:" click "Browse..." then select the test01.bat file\n\nafter that, click the schedule tab, and select at what time you want the computer to turn off.\n\nThen apply the changes and you are all set up!\n\n\nOk... now that I explained "How" to do it,... I will explain "Why" it works...\n\nwhen wrote in notepad, you were making a little program called a batch file. Batch files are simply commands that are sent as arguments to the command prompt... so when you open this file it will send the contents to the command prompt and execute its contents.\n\nso... here is what you told the computer to do in that batch file... \nshutdown - shut downs the computer...\n/s  - comfirms you are shuttng down the computer (rather then restarting it)\n/c "comment" - will display a comment when the computer is shutting down.\n\nokey dokey, then we created a system task. the system task will execute this program, and will shut down the computer at the time that you set it to...\n\nhope this helps...\n\n\n\n\n\n\n\n\nedit... the below does not work,... disreguard....\n\nYou can set a system scheduald command... here is the easy steps.\ngo to...\n\nStart>Run> cmd\n\nthen the command prompt should come up...\nthen type the following...\n\nat 20:30 shutdown\n\n(in place of 20:30 type the time you wish the computer to shutdown, make sure it is in military time/24hour format)\n\nthen at that time, the computer will shut down...\n\n\nhope this helps\n\n**brb ill check to make sure this works... brb**
940638
Probably the easiest way is to tar all the files into a single file and then use uuencode to send the single file.\n\nuuencode file.tar file.tar | mailx -s "incoming files" you@yahoo.com\n\nOtherwise you can do something like combining them all into a single text file and sending it.\n\nfor a in file1 file2 file3 file4 file5\ndo\n  uuencode $a $a >> mailtext\n  echo >> mailtext\n  echo "===============" >> mailtext\n  echo >> mailtext\ndone\n\nmailx -s "incoming files" you@yahoo.com < mailtext\n\nEach file will be separated by a line (the ==== )
656715
You could create a batch file. ie. runcmd.bat and inside it put the command cmd. Alternatively you could run commands using a vbscript file. Or you could use an MS-DOS or WindowsXP bootdisk and boot into that instead of windows. I create the systems that keep students from doing this sort of thing, and in general, the security is pretty strong, but good luck to you.
422343
send  a copy of ur results , its important
849130
sort +3 filename | head -4| tee /dev/tty output.txt\n\n\nhere what you are doing is sorting the lines on the 4rth field ,taking the first 4 lines and then sending it to the terminal as well as redirecting it to output.txt ,the tee command does that...to learn more about it\n\nhttp://www.computerhope.com/unix/utee.htm\nhttp://softpanorama.org/Tools/tee.shtml
1021196
The below example demonstrates how to create a time log of when the batch file is loaded, or for example, this could be used in the autoexec.bat when someone logs into a computer that supports this file.\n\nECHO. |TIME > TIME\nCOPY LOG +TIME\n\nAn alternate, slightly more complicated method that, cannot be used in Windows NT, Windows 2000 or Windows ME would be the following:\n\necho @prompt set date=$d$_set time=$t$h$h$h > {a}.bat\n%comspec% /e:2048 /c {a}.bat > {b}.bat\nfor %%v in ({b}.bat del) do call %%v {?}.bat\necho %date% %time% >> log\n\nAnother alternative is:\n\necho. |time |find "current" >> log\n\nFor the above batch file to work properly you must create a file called log by typing "edit log" (without the quotes) and then save and exit the file which will create the file at 0 bytes. If this file is not created or not created properly you will receive the error message "Content of destination lost before copy".
54911
to make the batch file you would start a new page in Notepad.  Then the command you would use is START.  You have to know the location on your computer where the MS Access program is at (not the shortcut).  So it would be START <location of file>
246348
there is an old dos program that will make a bat into a com file, called bat2com hope this helps.
1006941
The "sleep" command included in the Microsoft Resource Kit is an excellent utility that will perform exactly what you need.\n\nIt comes as part of most recent resource kits downloadable from Microsoft.  Here's the 2003 server resouce kit link, http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en\n\nHere are links about sleep.exe\nhttp://www.google.com/search?hl=en&lr=&q=microsoft+windows+%22resource+kit%22+sleep.exe+%22batch+file+wait%22\n\nAs far as I know, sleep.exe is not tied to any particular version of MS Windows OS, so the one in the 2003 resource kit will be fine for your purposes.\n\nThe syntax is simple\n  sleep xxxx\nwhere xxxx is the number of seconds you want the system to wait before processing the next line of your batch file.
299788
Use DOS.  open up a command window.  Start>Run  type CMD.\n\ncd yourdirectory...   \n\nthen type DIR this will give you a list of names and directorys.  \n\nright click... select all.  then right click on the dos window pane at the top (this is important).  then select Edit copy.  you can paste the text wherever you want to print.
1117862
Try using File->Place...\n\nYou can also copy/paste from either another source or other open window in PS. Good luck.
288038
Have you got it set up in your prefferances to only use plain text\ntry > tools > option > send
875358
What a great question!\n\nYou know, I used to write batch files for everything under the sun back in the old DOS 6 / Windows 3.11 days, but somehow got away form doing so as Windows evolved -- I wasn't even sure it still supported batch files!  But a little digging turns up the fact that yes it does.  It appears that what you are after is a "script file" (which seems to do within Windows what the Batch files do within DOS), though I'm not yet sure if that denotes a truly different type of file or if it is just a different name for the same thing.\n\nAnyway, here are a few interesting looking links I found:\nhttp://www.student.oulu.fi/~vtatila/batch_tutorial.html\nhttp://labmice.techtarget.com/scripting/default.htm\nhttp://www.onesmartclick.com/programming/batch-files.html\n\nSorry I couln't be more help than that, but hopefully it gets you started in the right direction.  Thanks for asking the question, it gave me something new to go learn about!
681199
A .bat file is also called a batch file.  It is basically a plain text file that contains a number of DOS commands, each of which could be run individually from the command prompt. By putting them into a batch file, they can be run as a group by simply running the batch file.\n\nYou create a batch file by using an ASCII text editor, such as DOS EDIT, or Windows Notepad. When you have created the batch file, you save it with a file name, and give it the extension *.bat. \n\nThat said, hopefully you can see why you don't need a program to download a batch file, you just have to know how to run it.
274283
click file> send> shortcut to desktop and you're done!
160039
or you could write a batch file that has something like\n\nexec C:/path/to/file.exe\nexecC:/path/to/next/file.exe\n\nput this into a txt file then save it as a .bat it will execute the first program then when it is done it will execute the second program