Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: chdir for another machine

by samurai (Monk)
on Nov 07, 2002 at 16:43 UTC ( [id://211112]=note: print w/replies, xml ) Need Help??


in reply to chdir for another machine

Sounds like you're on a windows machine. I believe perl will support anything that the dos shell will support on filesystems. In other words, if you can't "cd" in dos to \\machine\folder, then perl can't chdir to it (which is the case here).

I would suggest mounting \\machine\folder1 or whatever on one of your drive letters (M:, N:, etc) and THEN chdir'ing in perl to that directory.

--
perl: code of the samurai

Replies are listed 'Best First'.
Re: Re: chdir for another machine
by John M. Dlugosz (Monsignor) on Nov 07, 2002 at 20:30 UTC
    I just tried it, and it works fine if I double-up the backslashes inside the quotes.

    Perl changed the current directory for the process. Then when doing a system('dir') the stupid CMD.EXE shell reports "'\\FOO\BAR' is an invalid current directory path. UNC paths are not supported. Defaulting to Windows directory.".

    —John

Re: Re: chdir for another machine
by John M. Dlugosz (Monsignor) on Nov 07, 2002 at 20:27 UTC
    What does the brain-dead COMMAND.COM or CMD.EXE shell have to do with it? 4DOS/4NT has always supported chdir'ing to network paths and UNC names, even though MS's stuff did not. The native change-directory function in the Windows API supports UNC names; if Perl passes through to that unmunged it should work.
Re: Re: chdir for another machine
by Zitoune (Beadle) on Nov 07, 2002 at 18:11 UTC
    k i taught to do this but it's the way i wanted to do it. I'll try another way. thanks anyways

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found