Linking files

Linking files

am 31.08.2007 01:34:41 von fzarabozo

This is a multi-part message in MIME format.

--===============0160873292==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0034_01C7EB34.6E002B00"

This is a multi-part message in MIME format.

------=_NextPart_000_0034_01C7EB34.6E002B00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello All,

I'm working on a script that needs to make a backup of somefiles in some =
point. However, the link function doesn't make a copy of the files. If i =
link a file and then write to any of those files, any changes affect to =
both files just like if they were the same file. This is strange on =
Windows, but it happens just like that. Do you know if there's a way to =
copy a file without allowing that to happen?

Cheers,

Paco


------=_NextPart_000_0034_01C7EB34.6E002B00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



charset=3Diso-8859-1">




Hello All,

 

I'm working on a script that needs to =
make a backup=20
of somefiles in some point. However, the link function doesn't make a =
copy of=20
the files. If i link a file and then write to any of those files, any =
changes=20
affect to both files just like if they were the same file. This is =
strange on=20
Windows, but it happens just like that. Do you know if there's a way to =
copy a=20
file without allowing that to happen?

 

Cheers,

 

Paco

 

 


------=_NextPart_000_0034_01C7EB34.6E002B00--


--===============0160873292==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0160873292==--

Re: Linking files

am 31.08.2007 02:21:12 von Bill Luebkert

Paco Zarabozo A. wrote:
> Hello All,
>
> I'm working on a script that needs to make a backup of somefiles in some
> point. However, the link function doesn't make a copy of the files. If i
> link a file and then write to any of those files, any changes affect to
> both files just like if they were the same file. This is strange on
> Windows, but it happens just like that. Do you know if there's a way to
> copy a file without allowing that to happen?

I'm assuming link on Win32 would do the equivalent of link on UNIX
which would be to just create two filenames that point to the same file.

So why not just copy the files ? File::Copy module should be useful.
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs