Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Running perl on NT server

by Anonymous Monk
on Jun 25, 2003 at 15:47 UTC ( #268881=perlquestion: print w/replies, xml ) Need Help??

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

I am trying to run a search script on a NT server. The script works on my local NT workstation when I run it from "/perl/bin". I am using the File::Find module. I now need to run the search on my server searching the "inetpub/wwwroot" directory.
The problem is on the server the "inetpub/wwwroot" is on the F drive. I am trying to run this script to fetch data in this directory:
"inetput/wwwroot"
but get an error where it cant find the directory. Error message:
Can't stat /inetpub/wwwroot: No such file or directory No such file or directory


I am running it using the "use File::Find"
Here are my attempts:
find( &mySubroutine, "inetpub/wwwroot"); find( &mySubroutine, "F://inetpub/wwwroot"); find( &mySubroutine, "F:/inetpub/wwwroot"); find( &mySubroutine, "F:\\inetpub\wwwroot"); find( &mySubroutine, "F:\inetpub\wwwroot"); find( &mySubroutine, "\inetpub\wwwroot");

Replies are listed 'Best First'.
Re: Running perl on NT server
by Rhose (Priest) on Jun 25, 2003 at 15:58 UTC
    Icky Windows backslashes... *Smiles* You need to double blackslash each one.

    You should be able to use either of these:

    find( \&mySubroutine, 'F:\\inetpub\\wwwroot'); find( \&mySubroutine, 'F:/inetpub/wwwroot');
      Thanks
Re: Running perl on NT server
by Grygonos (Chaplain) on Jun 25, 2003 at 16:01 UTC
    as far as I know, the correct way to list the directory is

    F:\\inetpub\\wwwroot

    you still need to double \ every directory .
    I haven't used File::Find so I can't tell you about your usage of that. Hope this helps some.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://268881]
Approved by gellyfish
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2019-12-08 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?