Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: why IPC::Open3 can't execute MS-DOS "dir" command?

by bingos (Vicar)
on Dec 04, 2009 at 11:44 UTC ( [id://811063]=note: print w/replies, xml ) Need Help??


in reply to why IPC::Open3 can't execute MS-DOS "dir" command?

Very likely because dir isn't actually a command in and of itself, but is a built-in command of cmd.exe

Change "dir * \/b\/s" to be "cmd /C dir * \/b\/s"

You also shouldn't call subroutines with the & prefix, unless you know the behaviour that implies

  • Comment on Re: why IPC::Open3 can't execute MS-DOS "dir" command?

Replies are listed 'Best First'.
Re^2: why IPC::Open3 can't execute MS-DOS "dir" command?
by Anonymous Monk on Dec 07, 2009 at 01:17 UTC
    Change "dir * \/b\/s" to be "cmd /C dir * \/b\/s"
    Seems it can't work, got the following error:
    Execute Command: cmd /c dir * /b/s [ERROR] (1) : Parameter format not correct - "s"".
    And if I remove the parameters "/b/s" it stopped again.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://811063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found