I can't get use File::Copy to work. I declare it at the beginning of
script but when I try to use it latter nothing happens. There are no errors
and nothing is copied.
Did you also add use strict and use warnings at the begin of the script and
still saw nothing?
--
Books below translated
On 20 Dec 2006 at 8:00, Dukelow, Don wrote:
I can't get use File::Copy to work. I declare it at the beginning
of script but when I try to use it latter nothing happens. There are
no errors and nothing is copied.
I'm using the command!
copy($variable, $variable2);
I've also tried cp
Jeff Pang am Mittwoch, 20. Dezember 2006 15:09:
Dukelow, Don [EMAIL PROTECTED]
I can't get use File::Copy to work. I declare it at the beginning of
script but when I try to use it latter nothing happens. There are no
errors and nothing is copied.
Did you also add use strict and use
Apparently I can no longer send email to this list
from my work account because of:
The following message to beginners@perl.org was
undeliverable.
The reason for the problem:
5.1.0 - Unknown address error 550-'Mail from
cardinal.com rejected because it does not accept
bounces. This violates RFC
Is that File::Copy or FILE::copy? The former is what you want.
Dp.
On 16 Mar 2006 at 9:53, Sonika Sachdeva wrote:
Hi All,
I have used FILE::copy , perl syntax check is OK.
and am getting the following error when it tries to perform the copy
function . This is on windows system.
code
Sonika Sachdeva wrote:
Hi All,
I have used FILE::copy , perl syntax check is OK.
and am getting the following error when it tries to perform the copy
function . This is on windows system.
That has to be: use File::Copy;
Case is important in Perl.
On certain OSes, like Mac OS X, case in file
Thanks for your response.
I did change the module name. It works but now it hangs at the copy command
without giving any warning/error. ( plz refer the code)
thanks,
On 3/16/06, Dermot Paikkos [EMAIL PROTECTED] wrote:
Is that File::Copy or FILE::copy? The former is what you want.
Dp.
On
It works . Thank you all.
On 3/16/06, Sonika Sachdeva [EMAIL PROTECTED] wrote:
Thanks for your response.
I did change the module name. It works but now it hangs at the copy
command without giving any warning/error. ( plz refer the code)
thanks,
On 3/16/06, Dermot Paikkos [EMAIL
Hello,
end code snippet
Please try to write cleaner code, its hard to read :) (See Perl Best
Practices by Damian Conway, Oreilley)
error:
undefined subroutine main::copy
What could be the mistake?
a) FILE::copy probably doesn;t exist but rather: File::Copy
b) you have not imported
Thanks for the pointers.
On 3/16/06, JupiterHost.Net [EMAIL PROTECTED] wrote:
Hello,
end code snippet
Please try to write cleaner code, its hard to read :) (See Perl Best
Practices by Damian Conway, Oreilley)
error:
undefined subroutine main::copy
What could be the mistake?
a)
JupiterHost.Net wrote:
a) FILE::copy probably doesn;t exist but rather: File::Copy
Sadly :( FILE::copy does exist in some operating systems; like MS DOS
and Mac OX S. This is because they do not distinguish between uppercase
and lowercase in file names. Perl seems to find the correct module
Paul Kraus wrote:
I have a perl script that uses file::copy to copy files from a server
Funny, I couls only find File::Copy on cpan but no file::copy :)
to the local machine. It does alot more then that but is pretty much
the jist of what is taking place. Currently i have to have the local
From: Paul Kraus [EMAIL PROTECTED]
I have a perl script that uses file::copy to copy files from a server
to the local machine. It does alot more then that but is pretty much
the jist of what is taking place. Currently i have to have the local
machine first establish the connection so that
On Jan 21, zentara said:
copy( $ARGV[0], $ARGV[0]\.bak );
chmod ($mode, $ARGV[0]\.bak);
print Backup completed.\n;
Why do you backslash the . in $ARGV[0]\.bak but not in completed.\n?
Long story short, you don't need to \ the . in either case, and you don't
need quotes around $ARGV[0] as the
This is what I found in ActiveState Doc concerning File::Copy:
Special behaviour if syscopy is defined (OS/2, VMS and Win32)
If both arguments to copy are not file handles, then copy will perform a ``system
copy'' of the input file to a new output file, in order to preserve file
Larry Guest wrote:
Anyone know how to get File::Copy module to keep file permissions when
it copies from one location to another?
Thanks
File::Copy also provides the syscopy routine, which copies the file
specified in the first parameter to the file specified in the second
parameter,
]
Sent: Tuesday, January 20, 2004 4:46 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: File::Copy
-SNIP--
So if you are on any of the three systems above andyou are NOT
doing file handles, then the files should have the same file
permissions. If you
From: Yupapa.com [EMAIL PROTECTED]
If you are transfering file from a local machine to a remote machine,
you do not use File::Copy module to copy files. File::Copy is used
for copying files locally. You can use Net::FTP to transfer files
from one machine to another. And of course, you will
From: Yupapa.com [EMAIL PROTECTED]
If you are transfering file from a local machine to a remote machine,
you do not use File::Copy module to copy files. File::Copy is used
for copying files locally. You can use Net::FTP to transfer files
from one machine to another. And of course, you will
HiHi~
If you are transfering file from a local machine to a remote machine, you do
not use File::Copy module to copy files. File::Copy is used for copying
files locally. You can use Net::FTP to transfer files from one machine to
another. And of course, you will need a FTP server for the
HiHi~
If you are transfering file from a local machine to a remote machine, you do
not use File::Copy module to copy files. File::Copy is used for copying
files locally. You can use Net::FTP to transfer files from one machine to
another. And of course, you will need a FTP server for the
B. Fongo wrote:
Hi,
I've a small script intended for file transfer from a windows
machine to a remote linux server. To implement that, I decided to
use two module i.e File::Basename, File::Copy and CGI.pm.
The File::Copy is working well locally, but it fails to copy files
to a remote
Yep, I've thought of that, but with so many files
(it's an internal backup) I don't want to slow the
process down by checking the source/dest filename on
both drives and their dates before copying, I was
hoping for there might be an obscure module out there
that handled it neatly...
If not, no
Ben Crane wrote:
Yep, I've thought of that, but with so many files
(it's an internal backup) I don't want to slow the
process down by checking the source/dest filename on
both drives and their dates before copying, I was
hoping for there might be an obscure module out there
that handled it
- Original Message -
From: Ben Crane [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:21 PM
Subject: RE: File::Copy - Additional Parameters?
Yep, I've thought of that, but with so many files
(it's an internal backup) I don't want to slow the
process down
Okay, Some good leads to work with...Thanx for the
heads up guys!!
Ben
__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Hi Ben
Ben Crane wrote:
Anyone know if the perl module File::Copy can handle
date checks? Or whether there is another module that
only deals with copying files that are newer than the
ones they are over-writing?
Similar to the Xcopy /D: command
[I don't want to use a batch file at the
You could always use stat() on the files to decide which ones you want to
copy...
-Original Message-
From: Ben Crane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 4:31 AM
To: [EMAIL PROTECTED]
Subject: File::Copy - Additional Parameters?
Hi all,
Anyone know if the perl
If you want to append the contents of one file to another, then you will
have to open both files, read the first one, and write it to the second one.
Something like this should work:
##
use strict;
use warnings;
open(LOG,mylog.log) || die Couldn't open logfile for
if you want to append to a second file then you should use when
opening, not or you will delete the text already there. if it was just
a typo then ignore me.
On Mon, Oct 07, 2002 at 07:20:29 -0700, Timothy Johnson wrote:
If you want to append the contents of one file to another, then you
Sorry for not explaining better. See commments below.
-Original Message-
From: Mat Harris [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 7:24 AM
To: Timothy Johnson
Cc: 'Steve'; [EMAIL PROTECTED]
Subject: Re: File::Copy question
if you want to append to a second file
Steve wrote:
I am using Windows 98 and ActiveState Perl. I have a log file that after a
certain size is truncated and reused. I have written a simple script to
copy that file to another file using File::Copy. Is there a way to make
sure the second file is appended instead of overwritten,
On Sep 29, Steve said:
Is there a File::Copy available for ActiveState Win32?
Yes; it is a standard module.
--
Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
** Look for Regular Expressions
Does anyone know how to use the file copy module to past files to remote
servers?
i.e.
server 1:x
server 2:y
I want to copy the file named foobar from x to y. Can this be done?
William Black
_
MSN Photos is the easiest way
William Black wrote:
Does anyone know how to use the file copy module to past files to remote
servers?
i.e.
server 1:x
server 2:y
if your os is unix/linux. try if you have scp like:
scp server 1:from_file server 2:to_file
Windos might have something similar
david
--
To
On Mon, Sep 23, 2002 at 09:31:25AM -0400, William Black wrote:
Does anyone know how to use the file copy module to past files to remote
servers?
File::Copy is for copying and moving files on the local filesystem. I'm not
sure why you would be trying to apply it to this problem, or why you'd
: Monday, September 23, 2002 11:45 AM
To: [EMAIL PROTECTED]
Subject: re: FILE COPY
William Black wrote:
Does anyone know how to use the file copy module to past files to remote
servers?
i.e.
server 1:x
server 2:y
if your os is unix/linux. try if you have scp like:
scp server 1:from_file
Slavtek wrote:
Hello,
I want to copy some files from one place to another. Maybe someone tell me how can I
do this using Perl?
Thanks in advance!
perldoc File::Copy
Loop through the files in your source directory (using glob or opendir and readdir)
and copy them.
perldoc -f glob
perldoc -f
I suspect the answer to this is you can't abuse perl that way on
WinNT, but I'll post anyhow.
I'm distributing files across several machines on an NT network; for
various reasons I need the status that the File::Copy module returns
but can't rely on mapped drives.
UNCs and IP paths
On Wed, Jul 25, 2001 at 04:22:01PM +0200, Birgit Kellner wrote:
Hi,
I am using File::Find and File::Copy to accomplish the following:
check a directory tree for all files that end in *.html and copy them to a
different directory, preserving the tree structure.
The following code works
--On Mittwoch, 25. Juli 2001 09:27 -0800 Michael Fowler
[EMAIL PROTECTED] wrote:
Thanks for the hint to File::Path;
Just one more question to make sure:
foreach $file (@files) {
### $destfile will be the copied file in subdir admin, $file the
### original
file in $origdir or one
On Wed, Jul 25, 2001 at 08:46:21PM +0200, Birgit Kellner wrote:
--On Mittwoch, 25. Juli 2001 09:27 -0800 Michael Fowler
[EMAIL PROTECTED] wrote:
Assume $targetdir holds /home/somedir and $2 holds
/anotherdir/yetanotherdir/;
So, to check if the dir /home/somedir/anotherdir/yetanotherdir
--On Mittwoch, 25. Juli 2001 12:45 -0800 Michael Fowler
[EMAIL PROTECTED] wrote:
can't be done; the regex memory variables ($1, $2, $3, etc.) are
read-only.
I had already noticed that when I tried it in the meantime :-)
It's really irrelevant, though; the trailing slash can be left in,
43 matches
Mail list logo