- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- windows to unix ftp 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
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
07-07-2005 07:40 AM
07-07-2005 07:40 AM
Thanks
Rajesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 07:55 AM
07-07-2005 07:55 AM
Re: windows to unix ftp script
user username password
put filename
quit
EOF
NOTE:
This assumes that username's default directory is where you want to upoad the files. If not, insert a cd command to change directory before the put statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 07:57 AM
07-07-2005 07:57 AM
SolutionIn either case, a very straightforward way of setting up a scripted FTP client is via Perl's NET::FTP Module.
You can install a free version of Perl for Windows from http://www.activeperl.com/.
Here is the ftpget.pl. You can specify the remotehost, login, password, (or read them from .netrc), directory, binary or ASCII, and filenames. Invoke as ftpget.pl -u for full usage.
Generally it's something like:
ftpget.pl -h remotehost -l cstephen -p topsecret -A -d /var/tmp -t 5 file1 file2
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "All files ok"
else
echo "Failed; status = ${STAT}"
fi
All error-checking, timeouts, and retries are built-in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 07:58 AM
07-07-2005 07:58 AM
Re: windows to unix ftp script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 08:28 AM
07-07-2005 08:28 AM
Re: windows to unix ftp script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2005 08:14 AM
11-17-2005 08:14 AM