- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send files from W2K to HP-UX Servers
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
01-23-2003 03:24 PM
01-23-2003 03:24 PM
Perhaps I should post this in another forum but I think my luck will be better here. Once a week, a client needs to send 3 large text files for import into a database running on HP-UX 11i. The client insists that we do an FTP push but it must be automatic. All they want to do is run a batch file when the transfer is ready and leave for the day. The batch file is then supposed to log them in and start sending. W2K has an FTP client but I haven't been able to script anything that works. Does anybody have any suggestions?
Thanks and please help,
Mary Rice
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:28 PM
01-23-2003 03:28 PM
Re: Send files from W2K to HP-UX Servers
I'd recommend, in this order:
1) perl along with it's ftp module - powerful & capable.
2) expect language - as it's designed for response/reply type scenarios such as logins.
Either way you'll have to deal with the issue of usernames & PWs in clear-text in these scripts. May want to look at using the HP-UX command crypt to encrypt these values in the script and decrypt them during execution.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:29 PM
01-23-2003 03:29 PM
Re: Send files from W2K to HP-UX Servers
If this were me, my weapon of choice would be Perl. The Net::FTP module makes this rather easy. Is Perl an option for you and your client?
If the client insists on a .BAT file then you done got yourself the wrong boy.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:32 PM
01-23-2003 03:32 PM
Re: Send files from W2K to HP-UX Servers
Thanks for the quick reply. Perl would be fine as long as it is not too expensive and is easy for the user to use. Is there a demo version that I can try?
Mary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:35 PM
01-23-2003 03:35 PM
Re: Send files from W2K to HP-UX Servers
http://www.activeperl.com/
You will also need the Net::FTP module (I don't think it's supplied from ActiveState) but you can download it from www.perl.org/CPAN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:38 PM
01-23-2003 03:38 PM
Re: Send files from W2K to HP-UX Servers
I just got this to work on my Windows XP pro machine. It requires 2 files to do the job though.
FTP.BAT
ftp -i -n -v -s:FTP.TXT
FTP.TXT
user username password
dir
bye
I got this from the Windows XP help for their FTP command.
In short, the -s option lets you specify a file that contains FTP commands to run. So when you execute the FTP.BAT file it will run FTP and then FTP will call the FTP.TXT file to login and do whatever else is contained in that file.
I hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 03:41 PM
01-23-2003 03:41 PM
SolutionI might as well get you started:
ftpput.pl file1 file2 file2
will login, cd to /tmp, go to ascii mode, and then start transferring file1, file2, and file3. Error checking is done and it will attempt 5 retries before giving up.
You can avoid the plaintext passwd by using .netrc. I made those comments in the code.
At some point, it looks like I am going to have to give this routine some options for hostname, directory, and pass in the user and optional passwd so that everything can be driven from the command line.
This should be very close to what you need.
Now go play with your Perl, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2003 04:04 PM
01-23-2003 04:04 PM
Re: Send files from W2K to HP-UX Servers
don't use FTP (or TELNET) any more, as those transmit passwords in plain text :-(
Since HP finally supports SSH ="SecureSHell"(OpenSSH), which comes with SCP = "SecureCoPy", use that:
scp sourcefile user@unix:/targetdir
ssh -l user unix batch...
much better...
And you can get SSH/SCP for free for W2K from CYGWIN!
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2003 03:10 AM
01-24-2003 03:10 AM
Re: Send files from W2K to HP-UX Servers
I use that all the time between my W2K 'workstation' and my HP-UX systems. Since rcp can copy both ways and you can use rsh to execute a script on the HP-UX system, there isn't much which you can not do this way. I even have W2K Scheduled Tasks which execute .bat files to do everything automatic.