- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp script from NT/W2K/W98 to L1000; HP UX 11.0
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:33 AM
12-18-2001 08:33 AM
I set them up as a user on the L1000 and want them to ftp the files to that home directory.
They asked me to give them an ftp script, which I did:
ftp -i -n << EOF
open ip_of_my_L1000
user username passwd
put local_path_of_file_on_MS_machines
prompt off
bye
EOF
This works fine for me between UNIX systems, but they don't know how to get it to work on their PCs. I'm not sure how to get it to work in a script on a PC w/out accessing the script from "Start"; "Run", "Open" and run it as a script from that point.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:36 AM
12-18-2001 08:36 AM
SolutionJust create a text file with it and rename it to:
name.bat
This will create an executable batch file similar to what you are using on UNIX.
There are also some versions of cron for windown around for free.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:37 AM
12-18-2001 08:37 AM
Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0
the batch file can go on the desktop and just double click it to run the job.
Can also be executed in dos.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:46 AM
12-18-2001 08:46 AM
Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0
They were attempting to run it with a .com extension for some reason. Works fine now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:47 AM
12-18-2001 08:47 AM
Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0
When I have to do ftp scripting nowadays, I use perl with the Net::FTP module (available for download at www.perl.org/CPAN). It really makes FTP operations very simple. Any error conditions and timeouts are easy to test for and set. The other advantage is that unlike shell script based solutions, your perl scripts can run unchanged on NT and W2K boxes if you install the freely available product ActivePerl (www.activeperl.com) . It's also very easy to add error checking as well. Be sure to download the Net::FTP module from www.perl.com/CPAN. It may be on ActivePerl's site as well.
It's usually something as simple as:
use Net::FTP;
use strict;
$ftp = Net::FTP->new("remhost.xxx.yyy", Debug => 0);
$ftp->login("anonymous",'cstephen@mama.com');
$ftp->cwd("/Downloads");
$ftp->get("Testfile.TXT");
$my $stat = $ftp->status;
if ($stat == 2)
{
print "Get was Good\n"
}
else
{
print "Get was bad; Status ",$stat,"\n";
}
$ftp->quit;
That truly is about as clean as it gets and with error checking to boot. With just a bit more work, you can add a signal handler to cover the timeouts in case a command hangs.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2001 08:50 AM
12-18-2001 08:50 AM
Re: ftp script from NT/W2K/W98 to L1000; HP UX 11.0
ftp command in DOS = 'ftp -n -s:file1.txt hosta'. Stick it behind an icon or in a bat file.
Contents of file1.txt contain the ftp commands as follows,...
user root/passwd
cd bla bla bla
get bla bla bla
bye
If you want to avoid prompts, use the -i option on the ftp command. PS. I have just finished testing this, it should work OK.
Share and Enjoy! Ian