The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> Windows Help
|
redirecting...
Discuss redirecting... in the Windows Help forum on Dev Shed. redirecting... Windows Help forum discussing tips, tricks, configurations, and more. Microsoft Windows is one of the most popular operating systems due to its ease of use.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 26th, 2002, 01:15 AM
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Kuala Lumpur, MY
Posts: 18
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
redirecting...
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
|
 |
An Ominous Coward
|
|
|
|
|
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
|
|
Registered User
|
|
Join Date: Aug 2002
Location: Kuala Lumpur, MY
Posts: 18
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
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
|
 |
An Ominous Coward
|
|
|
|
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:
Code:
`dir "c:/stupid_directory.txt"`
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|