Advertisement

03.22.2007 at 04:28PM PDT, ID: 22467145
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

xcopy gives invalid drive specification

Asked by ghosting in Perl Programming Language

Tags: , , ,

Hello,

I am still kinda of new to PERL programming, and need some help with system commands, pipes, and network shares / drives on Windows.  I am trying to XCOPY a file to a network drive or share, but I am getting "Invalid Drive Specification" when I run the script from CGI.  If I drop down to command line, and simply DOS XCOPY the files, it works fine.

What do I need to specify for PERL so that it KNOWS about my network drives and shares?  Why is it that when I try it from DOS it works fine, but when I run it from my script it fails with "Invalid Drive Specification"?

        my $cmd = 'xcopy '.$datafile.' '.$mailpickup.'';
        local *ALERTOUT = IO::File->new_tmpfile;
        local *ALERTERR = IO::File->new_tmpfile;
        local *ALERTIN = IO::File->new_tmpfile;
        my $pid = open3(">&ALERTIN", \*ALERTOUT, ">&ALERTERR", $cmd);

I am using IPC::Open3 to make the system calls and read the STDOUT & STDERR into arrays for parsing so I can check the results of the operation.  I can post the rest of code if needed, but I've tried replacing the $CMD arguments with something simple like "dir" and it works fine, no errors.  So I think it's got something to do with the network aware drives and shares available to PERL, please help...

Thanks in advance,
G
Start Free Trial
 
Keywords: xcopy gives invalid drive specification
 
Loading Advertisement...
 
[+][-]03.22.2007 at 04:42PM PDT, ID: 18775921

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.22.2007 at 05:04PM PDT, ID: 18776085

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.22.2007 at 06:05PM PDT, ID: 18776511

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.22.2007 at 07:39PM PDT, ID: 18777233

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: drive, xcopy, invalid, specification
Sign Up Now!
Solution Provided By: clockwatcher
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.23.2007 at 10:56AM PDT, ID: 18781757

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 - Hierarchy