04-09-2010
See my post on how to write a Windows Batch script which transfers files with M$ ftp in a Batch file. As mentioned in earlier posts the M$ ftp software must be installed and working. The main issues with M$ ftp are to do with listening but in this case we are initiating which is less of an issue.
https://www.unix.com/shell-programmin...assword-2.html
This tackles the automated file transfer from W2K to Solaris. Obviously you cannot transfer Solaris to W2K using ftp unless the W2K ftp server software is installed and working.
Last edited by methyl; 04-09-2010 at 09:29 PM..
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear Friend,
I don't know much about unix.I am an VB6.0 Programmer.I need to move an text files as aaa.txt from unix server to windows "D: " driver using the FTP protocol.Is it possible to do this with help of unix shell script.If possible please give some sample codes.
Please answer as early... (1 Reply)
Discussion started by: gjsaravanan
1 Replies
2. Solaris
Hi,
I have a folder with diff subfolders in my Unix box and now I want to ftp all the floders into my Windows machine. Is there any easy way to do that. When I use the "mget " cmd and try to FTP the files, it throws an error that the sub folder name does not exist.
Can you someone help in... (3 Replies)
Discussion started by: chandu_kalari
3 Replies
3. Solaris
Please let me know a efficient way to transfer files from a solaris to a windows machine. Total size of data is 800GB. (3 Replies)
Discussion started by: pingmeback
3 Replies
4. Shell Programming and Scripting
HI,
I have to transfer files from linux server to windows using secure ftp (sftp) .Kindly help me out. (3 Replies)
Discussion started by: manushi88
3 Replies
5. Solaris
Hello,
I have a couple of zip files to be copied from my local drive to a folder in solaris10 residing in a VM ware. i am using WINSCP, I tried to get hold of
the solaris hostname or ip using ifconfig -a , hostname|nslookup etc. when i create a new session in WINSCP using that IP and port... (6 Replies)
Discussion started by: herbich1985
6 Replies
6. IP Networking
hi, i want to write a shell script code which transfers files from a directory in unix server to a directory in a windows machine.. can any1 give me a sample code which uses ftp or sftp command..
thanks very much, (3 Replies)
Discussion started by: Little
3 Replies
7. Shell Programming and Scripting
Hi All
Please can you help, I´ve wrote the following script on a solaris 10 server to transfer files to a windows machine.
#!/usr/bin/sh
cd /moneta_polled01/download
HOST=10.100.4.72
USER=user1
PASSWD=V7stop
/usr/bin/ftp -v $HOST <<EOF
user $USER $PASSWD
cd tmp
binary
put... (7 Replies)
Discussion started by: fretagi
7 Replies
8. Shell Programming and Scripting
Hi All
I need to transfer a file from a UNIX server to a windows server.
I saw that it is possible to do this using scp command by looking at the forum listed below:
... (2 Replies)
Discussion started by: vx04
2 Replies
9. Shell Programming and Scripting
Hi
Please can you tell me what could be wrong with the following scriptto transfer files from solaris 10 to windows machine:
#!/bin/sh
HOST=<IP>
USER=administrator
PASSWD=xyz123zyx
/usr/bin/ftp -inv <<EOF
connect $HOST
user $USER $PASSWD
cd Documents
binary
mput *.sh
bye
EOF (23 Replies)
Discussion started by: fretagi
23 Replies
snarf(1) General Commands Manual snarf(1)
NAME
snarf - Simple Non-interactive All-purpose Resource Fetcher
SYNOPSIS
snarf [-avqprzm] URL [outfile] ...
DESCRIPTION
Retrieves data from a variety of protocols, namely http, ftp, and gopher.
USAGE
snarf is invoked with any number of URLs and outfiles. If an outfile is not specified, snarf preserves the remote file name when saving.
For example, snarf http://foo.bar.com/images/face.gif will retrieve the file ``face.gif'' to the local system. In the event that there is
no filename (the url ends in a slash), the data is retrieved and stored in the file index.html for http URLs, ftpindex.txt for ftp URLs, or
gopherindex.txt for gopher URLs.
Using a dash, "-", as the outfile causes snarf to send its output to stdout rather than a file.
To log in to an ftp server or website that requires a username and password, use the syntax http://username:password@site.com/. If you omit
the password, you will be prompted for it.
Snarf has a built-in option to download the latest version of itself; simply run snarf LATEST.
OPTIONS
-a Causes snarf to use "active" ftp. By default, snarf uses passive ftp, and, if the server does not support it, falls back to active
ftp. Using the -a option will avoid the initial passive attempt.
-r Resumes an interrupted ftp or http transfer by checking if there is a local file with the same name as the remote file, and starting
the transfer at the end of the local file and continuing until finished. This option only works with HTTP servers that understand
HTTP/1.1 and ftp servers that support the REST command. snarf uses this option automatically if the outfile already exists.
-n Don't resume; ignore the outfile if it exists and re-transfer it in its entirety.
-q Don't print progress bars.
-p Forces printing of progress bars. Snarf has a compile-time option for whether progress bars print by default or not. The -p option
overrides the -q option. In addition, if progress bars are enabled by default, snarf suppresses them when standard output is not a
terminal. Using -p will override this behavior.
-v Prints all messages that come from the server to stderr.
-z Send a user-agent string similar to what Netscape Navigator 4.0 uses.
-m Send a user-agent string similar to what Microsoft Internet Explorer uses.
Each option only affects the URL that immediately follows it. To have an option affect all URLs that follow it, use an uppercase letter for
the option, e.g. -Q instead of -q.
ENVIRONMENT
Snarf checks several environment variables when deciding what to use for a proxy. It checks a service-specific variable first, then
SNARF_PROXY, then PROXY.
The service-specific variables are HTTP_PROXY, FTP_PROXY, and GOPHER_PROXY.
Snarf also checks the SNARF_HTTP_USER_AGENT environment variable and will use it when reporting its user-agent string to an HTTP server. In
the same spirit, it also uses the SNARF_HTTP_REFERER environment variable to spoof a Referer to the web server.
BUGS
Bugs? What bugs? If you find 'em, report 'em.
AUTHOR
Copyright (C) 2000 Zachary Beane (xach@xach.com)
17 Jun 2000 snarf(1)