PDA

View Full Version : Batch Commands


RGHYUS
4-21-05, 03:24 PM
Can Anybody Please Give Me The Direct Command ThaT when I Open Up My Text File I Can See The Wholefile In The Bootup Screen IT JUST GOES DOWN THE SCREEN TO THE END OF THE FILE AND I CANT GET THE BEGINNNING So Far I Tried Type.file.txt/p And Type File.txt |more Both Dont Work WILL Somebody Please Give Me The Answer For That Batch Command

Alli
4-21-05, 03:35 PM
"Less", I believe. You use the up and down arrows to scroll.

extras
4-21-05, 04:28 PM
If it's MS Win, then "more" should do.
(I'm not sure if "less" is Windows/Dos machine.)

On the command line:
whatever.bat | more

Alli
4-21-05, 04:33 PM
Oh yeah, that was for Unix. But in my experience with "more," it scrolls down but not back up again.

RGHYUS
4-21-05, 07:50 PM
Your right it scrolls down but not back up they must have something somewhere and forget about the arrow keys i can just type type file.txt and it will scroll down but not back up i guess what i have to do is get all the commands and try each one at the bootup screen where can i get all the commands that are used

extras
4-21-05, 08:12 PM
You can install Cygwin, and you have lots of unix tools including "less".
http://www.cygwin.com/

RGHYUS
4-22-05, 01:47 PM
I FOUND A WEBSITE http://www.nukesoft.co.uk/msdos/a-z.php WHAT COMMAND WOULD YOU SUGGEST I USE | MORE DONT WORK AND /P DONT WORK

extras
4-22-05, 02:05 PM
You can install Cygwin, and you have lots of unix tools including "less".
http://www.cygwin.com/

And redirects and pipe works for stdout and stderr separately.
If you are trying to see the ERROR outputs,
you should redirect sdrerr, probably like this "whatever.bat 2| more".

I don't know if Win/DOS could do "2>&1" to duplicate stderr to stdout.

* You can also use some texteditor like "textpad" to capture output (I think both error and standard).
* Some console programs allow you to scroll back (including cmd.exe? of Win2K).
* You can connect via telnet, and many terminals let you capture the output into a log file.
* Maybe there is a precompiled binary for "less" that works on your machine.
* Probably, there are several other ways you can achive what you want. :)