A lib Net::FTP question.(Transfer file to OpenVMS)

A lib Net::FTP question.(Transfer file to OpenVMS)

am 06.07.2007 07:46:40 von Jimmy

I use Net::FTP to put file to an OpenVMS host.

As on OpenVMS new file is transferred by plus the version number by one
everytime instead of overwriting the old file.

I don't know whether Net::FTP has some method to force to overwrite the
file with the new transferred one.

Re: A lib Net::FTP question.(Transfer file to OpenVMS)

am 06.07.2007 10:21:19 von Sherm Pendley

"Jimmy" writes:

> I use Net::FTP to put file to an OpenVMS host.
>
> As on OpenVMS new file is transferred by plus the version number by one
> everytime instead of overwriting the old file.
>
> I don't know whether Net::FTP has some method to force to overwrite the
> file with the new transferred one.

I highly doubt it. The versioning that you're seeing is a feature of VMS,
not of the FTP daemon you're connecting to, or of Perl's Net::FTP module.

There might be some means by which the system admin can disable versioning
for a specific directory, disk, or in general - I honestly don't know. That
question would be better asked (and more likely to be answered) in a group
that discusses OpenVMS administration.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Re: A lib Net::FTP question.(Transfer file to OpenVMS)

am 06.07.2007 11:36:05 von Thomas Kratz

Jimmy wrote:
> I use Net::FTP to put file to an OpenVMS host.
>
> As on OpenVMS new file is transferred by plus the version number by one
> everytime instead of overwriting the old file.
>
> I don't know whether Net::FTP has some method to force to overwrite the
> file with the new transferred one.

No Net::FTP doesn't, but you don't need it anyway :-)

VMS treats ;0 as the last version of the file. So doing a

$net_ftp_obj->put($file_name, "$file_name;0");

should do the trick.

This is the same for every other FTP client as well.

Thomas

--
$/=$,,$_=,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~...... >r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k ^.-