FTP not using NET:FTP module ... Why dose this work???

Hi
Using Luke Bakkens reply

>If you can't install Net::FTP, the following works with the ftp.exe
>program on NT to get the file /tmp/frazzle in binary mode:
>
>open FTP, "> tmpftp.$$";
>print FTP <<EOF;
>$username
>$password
>bin
>get /tmp/frazzle
>bye
>EOF
>close FTP
>system "ftp -s:tmpftp.$$ $hostname";
>unlink tmpftp.$$
>
>on unix, the system call would be this i believe:
>system "ftp $hostname < tmpftp.$$";
>
>good luck
>Luke

I went and did the following, but I'm not at all sure what I have really
done and why it works.
Can someone, explain please? It is Sun/Unix that this is running on.
& username and p/w are setup for my user account to allow me to ftp 
to certain other boxes.

<snip>
my $ftp_cmds;

    $ftp_cmds =
            "bin\n"
            ."hash\n"
            ."cd /opt/sdnm/install/releases\n"
            ."mkdir $rel_number\n"
            ."cd $rel_number\n"
            ."lcd /opt/sdnmbuild2/releases/$rel_number\n"
            ."put release_sdnm_$rel_number.tar\n"
            ."bye\n";

    system("ftp $hostname  << $ftp_cmds");


Thanks 

Jim


0
James
7/18/2001 4:18:26 AM
perl.beginners 29382 articles. 4 followers. Follow

0 Replies
622 Views

Similar Articles

[PageSpeed] 10

Reply:

Similar Artilces:

automatic FTP not using NET:FTP module
Hi, I have to automate ftp process using perl or shell scripts. At the moment I cannot install NET:FTP class. So any pointers for me on how do this. thanks, vas _______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/ On Wed, Jul 11, 2001 at 10:20:58AM -0700, srinivas.s@excite.com wrote: > I have to automate ftp process using perl or shell scripts. At the moment I > cannot install NET:FTP class. So any pointers for me on how do this. Why can't you install Net::FTP? Really, it&#...

RE: ftp w/o using Net::FTP
James P Donnelly <jpd4@cisunix.unh.edu> asked: > I am only trying to login into a server, travese to the > correct directory, dump a file and quit. I have hacked > together something that gets me to the server and > then it seems to hang at the login.. Has anyone written > something like > this w/o use of the module? Any insight would be very helpful > > Thanks -- Jim > > > $cmd = 'rftp'; > $rftp_commands = > "open > $fHost > $user > $...

FTP to FTP
Lately I've been seeing scans show up of a port 21 trying to connect to my port 21 (I am not, BTW, running an FTP server). Is this just someone trying to use my IP as the middleman in an FTP bounce attack, assuming my port 21 had been open and with a writeable FTP directory? http://www.cert.org/advisories/CA-1997-27.html ...

Mulriple File Transfers using NET::FTP module...
Hello, Can someone out there help? I have written a small script below, to dowload files for an FTP server. I employed the NET::FTP module. Somehow I cannot find a command on NET::FTP that can allow mulriple file retieval using a wildcard or other. @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S "%0" %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl...

VB.NET
All, This is probably a much harder question than what should go in the "Getting Started" forum, but I am new and don't know where to put it. Anyways, I am currently developing an FTP class in VB.NET. It's kid tested, mother approved when trying to access an FTP Server on a Windows box meaning I can connect, run commands, upload and download a file no problem. My issues come when I try to use the same class with the same commands to access an FTP server on a UNIX box. I can connect and login just fine, but after that all my commands come back "500 'PWD': command not understood.". This is fo...

Anyone have Cute FTP or use an ftp
I need tips on how to connect my computer to my buddies via FTP. We want to down load from each others computer, but it wont allow us to connect ??. any and ALL help or howto guides/links welcome. Ian >I need tips on how to connect my computer to my buddies via FTP. We want to >down load from each others computer, but it wont allow us to connect ??. any >and ALL help or howto guides/links welcome. For starters, you will both need FTP servers. CuteFTP is a FTP client, not a server. It's the FTP equivalent of a browser. For two way transfers, you will need both servers...

ftp folder using asp.net(vb.net)
 can i ftp a folder to a server using asp.net? anyone? thanks  Yes, you can use one of the Ftp components available, or just use the WebClient classhttp://www.windowsdevcenter.com/pub/a/windows/2006/12/12/building-ftp-services-using-net-20.html -- "Mark As Answer" if my reply helped you -- Yes, you can do it.  You actually just grab all the files out of the folder and send them up. See this: http://forums.asp.net/p/1288676/2483713.aspx Jason...

using Net::FTP
I can get and put a file using Net::FTP if I know the name of the file. I need to be able to open a directory and get all the files in it, without knowing their names. Here is my code that 'almost' works. $ftp->cwd("webshare:available:") or die "Can't cwd to webshare:available:"; my @items = $ftp->ls("webshare:available:"); foreach my $f(@items) { print "This file is named " . $f; print "\n"; $ftp->get($f) or die "Can't get file."; } There are 2 files in the available direct...

FTP a file to a FTP server with .NET code
    Hi,I want my web app to be able to upload a user submitted file via FTP to another server.  I'm checking out components and they seem way out of price range for me ($399+)  Isn't there some simple source code in .NET available ?   Or maybe somebody knows a good, reliable, cheaper component ?Any help much appreciatedthanks,mike123 See the Google search results for c# ftp upload, more specifically http://www.csharphelp.com/archives/archive9.html. RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question   ...

How to upload large files through FTP using Asp.net and VB.net
Hi, I want you to tell me that how can i upload the large files through FTP using asp.net and vb.net. I have developed a page where user can upload his/her file which is about 1-5 mb but if file size increase upto 50 mb then my page do not work. If i try so, then find the following error: The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log o...

Reverse FTP proxy on Primary FTP address not working
I am using Border Manager 3.6 Sp2a and placed all the reverse proxy filters in from Craig Johnsons Filter book for FTP (Great book!). Our ISP had moved our FTP address to another IP address and I had them put it back only after screwing with many different settings, to many to remember. If I use the reverse proxy from a secondary Public IP Address it works fine without filters loaded. If I reverse proxy from the primary address without filters it does not work. Anyway, this is how I would like for the system to be setup. Let me know if it is wrong. Server "A" Bo...

using GET of NET::FTP
get ($remote,$local,$where) is failing whenever i use the third arguement. here in this case my file to be downloaded from FTP is of size 5MB. 2Mb of it is downloaded, now when i am executing the get ($remote,$local,$where) with $where as 2MB(2048), get method is returning me nothing and download is getting aborted. can anybody plz help me out to solve this problem. ...

AND+FTP
This tool is designed specifically to deploy ASP.NET Visual Studio projects from a local workstation to a remote server using FTP. The same options to copy files offered from within Visual Studio using FrontPage extensions or File share are also available with this tool. Like Visual Studio, you can choose to deploy only files needed to run the application, all files in the project, or all files in the project's folders. Timestamps of previously deployed files are used to determine exactly which files in the project need to be deployed. This is a .NET WinForms application that uses a traditio...

Net::Ftp use proxy?
When cpan goes to do a "get", it first says LWP not available, then tries NET::Ftp (which failes because it is behind a FW and needs to use ftp_proxy) and finally lynx. Lynx works (fortunately). Should Net:Ftp be able to use my "ftp_proxy" set in the environment? http is more robust over a proxy On Sat, 19 Feb 2005 14:33:03 -0800, Linda W <cygwin@tlinx.org> wrote: > > When cpan goes to do a "get", it first says LWP not available, > then tries NET::Ftp (which failes because it is behind > a FW and needs to use ftp_proxy...

Web resources about - FTP not using NET:FTP module ... Why dose this work??? - perl.beginners

Resources last updated: 1/2/2016 12:39:55 PM