- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Ftp with a batch script
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
Discussions
Discussions
Discussions
Forums
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
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
тАО03-13-2007 06:58 AM
тАО03-13-2007 06:58 AM
Tommy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:07 AM
тАО03-13-2007 07:07 AM
Solutionftpput.pl -h remhost -l mickey -p secret -A -d /aaa/bbb -t 3 file1 file2 file3
STAT=${?}
if [[ ${STAT} -ne 0 ]]
then
echo "FTP failed; status = ${STAT}" >&2
fi
This will login to remhost as user mickey, password secret, set ASCII mode, cd to /aaa/bbb, allow for up to 3 tries per file, and put file1, file2, and file3.
NOTE: You don't have to pass the password on the command line if you have a .netrc file -- just like "real" FTP.
Invoke as ftpput.pl -u for full usage. The good news is that the script will run unchanged on Windows as well if you install one of the free Perls for Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:08 AM
тАО03-13-2007 07:08 AM
Re: Ftp with a batch script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:10 AM
тАО03-13-2007 07:10 AM
Re: Ftp with a batch script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:20 AM
тАО03-13-2007 07:20 AM
Re: Ftp with a batch script
If you do a man Net::FTP, you will see that passive mode is supported.
All you have to do is set the environment variable FTP_PASSIVE=1 and export before calling the Perl script.
You could also do it like this which would set it just for the command itself:
FTP_PASSIVE=1 ftpput.pl -h remhost ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2007 07:15 AM
тАО03-14-2007 07:15 AM