August 26th, 2002, 01:15 AM
i am a little bit confuse of redirecting command.
If i run this direct in msdos command prompt, the output is dump inside the file specified.
dir c:\ > "c:\dir.txt"
BUT, i f i type this command line using 'run' from start menu, the output i want to redirect goes to a window rather than inside the file i have specified.
Why is it .... can anyone help me...
September 10th, 2002, 05:50 PM
I get an error when I run the command from a run dialog under XP. What OS are you using? Generally, I've found that using redirecting or "piping" under a windows system is highly unreliable. In some contexts, it seems to work like it should, in others, it fails mysteriously and without error.
September 10th, 2002, 08:17 PM
after a long time, somebody answered to this. TQ ctb...
I'm using win2k os. No wonder you have an error because 'dir' is prompt command. Acctually i don't want exactly to run 'dir', but another application, which is 'mysqldump'. After i try and error, i've found this...
If i want to run from run start menu, i need to write this
cmd /c "mysqldump plot > dump.sql" rather than only this....
mysqldump plot > dump.sql
is this a correct thing??
September 10th, 2002, 08:29 PM
Yea, that works on XP.
In particular, I was referring to using redirect within an application or script on NT.
For example, if I execute this perl code:
Then IN THEORY, I believe that should create a file and write the directory contents to it (those backticks in perl mean "execute this shell program" which is a lot like typing it at the command prompt)... but it doesn't... it just makes an empty file calld "stupid_directory.txt".. never did figure out why.. just kludged it.