johnnydiamond08 has asked for the wisdom of the Perl Monks concerning the following question:

Hello I keep getting the following error from my code when I try running it please help, I apologize for not following formal fourm rules but this is urgent. Code: http://pastebin.com/qmtV2gd2 Error: 'diruse is not recognized as an internal or external command; I have diruse in the path I'm attempting to call C:\windows\system32 but still no solution.

Replies are listed 'Best First'.
Re: diruse is not recognized
by NetWallah (Canon) on Apr 16, 2013 at 03:11 UTC
    Supply the full path to "diruse.exe". Remember to escape the backslashes. Eg:
    open(DIRUSE, "c:\\windows\\system32\\diruse.exe . |");
    If the path contains spaces, you will need to include double-quotes to contain them.

                 "I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
            -- Dr. Cox, Scrubs

      I know this may be a bit redundant information, but to ensure you do not forget any backslash you can also write it with single slash which makes it a bit more readable. Windows can handle single slashes - at least since XP/2000.

      my $dirUseResult =  qx(c:/windows/system32/diruse.exe);

      Cheers!

Re: diruse is not recognized
by choroba (Cardinal) on Apr 16, 2013 at 07:50 UTC
    Crossposted at StackOveflow. It is considered polite to inform about crossposting so that people not attending both sites do not waste their efforts on solving a problem already solved at the other corner of the Internet.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: diruse is not recognized
by Anonymous Monk on Apr 16, 2013 at 08:02 UTC