copy isn't a standalone command, it's part of the command interpreter, so you have to
call it like this:
`command /c copy c:\\foo\\directory1 c:\\foo\\directory2`
or
system("command","/c","copy","c:\\foo\\directory1", "c:\\foo\\directory2")
-----Original Message-----
From: DeAngelo Lampkin [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 1:02 PM
To: [EMAIL PROTECTED]
Subject: DOS system call nightmares...
I'm having serious issues making even simple DOS system calls.
For example, one system call I want to execute is a function to copy all the contents
(files and subdirectories) of one directory to a second directory. Even that won't
execute correctly. I've tried the following variations:
(1)`copy c:\\foo\\directory1 c:\\foo\\directory2`; #Normal backticks operation. "#?"
tells me it's getting a bad file descriptor
(2)system("copy","c:\\foo\\directory1", "c:\\foo\\directory2"); #just in case
backslashes are interpolated
(3)system("copy","c:\foo\directory1", "c:\foo\directory2"); #just in case backslashes
aren't interpolated...yeah, I'm *that* desperate. :)
(4)system("copy","c:\foo\directory1 c:\foo\directory2"); # I Even saw this variant in
one mailing list archive
Also, is there a way to to grab the string that's actually being sent to the system
(as opposed to what I *think* is being sent to the system)?
Hopefully the problem is something really obvious and if it is, I'll bang my forehead
against the computer 50 times for wasting your valuable time.
Thank you for your help (and patience)!
DeAngelo Lampkin
Send and receive Hotmail on your mobile device: Click Here
_______________________________________________ ActivePerl mailing list
[EMAIL PROTECTED] To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs