My first thought is "spaces" in the path or file name. Best one is the nasty 
"c:\Program
Files" one!
Try this:
my @results = `copy $source\\$_ $dest`;
print "results: @results";
 
(or use the debugger, I do that a lot for this stuff...
 
 
-Stuart
[EMAIL PROTECTED]
770.977.4676

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jerry Kassebaum
Sent: Tuesday, December 11, 2007 10:48 PM
To: perl-win32-users@listserv.ActiveState.com
Subject: System Calls


On my Windows XP this line:

`copy $source\\$_ $dest`;

will copy files from c:\whatever\whatever\file.ext to the directory the Perl 
script is in,
but not to $dest. How do I make it copy to $dest?

FYI, $source="c:\\whatever\\whatever"; so the backslash isn't the problem.

In short, my question is, How do I do DOS commands from Perl, since `whatever` 
doesn't
work.

Jerry Kassebaum




  _____  

Share life as it happens with the new Windows Live. Share now!
<http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007>  

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to