Linking files

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16525" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello All,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>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?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Cheers,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Paco</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>

------=_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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0160873292==--
fzarabozo [ Fr, 31 August 2007 01:34 ] [ ID #1810051 ]

Re: Linking files

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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Bill Luebkert [ Fr, 31 August 2007 02:21 ] [ ID #1810052 ]
Perl » gmane.comp.lang.perl.active-perl » Linking files

Vorheriges Thema: select statement fails
Nächstes Thema: Follow-up question regarding shortcut creation/change