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

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.
Jimmy [ Fr, 06 Juli 2007 07:46 ] [ ID #1761954 ]

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

"Jimmy" <lofenee [at] yahoo.com.cn> 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
Sherm Pendley [ Fr, 06 Juli 2007 10:21 ] [ ID #1761956 ]

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

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 <file_name>;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

--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg, [at] _=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 ^.-
Thomas Kratz [ Fr, 06 Juli 2007 11:36 ] [ ID #1761958 ]
Perl » comp.lang.perl.modules » A lib Net::FTP question.(Transfer file to OpenVMS)

Vorheriges Thema: Reduce colors with Image::Magick
Nächstes Thema: LibXML and DTD's