Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RedHat 7.3 FTP Step by Step set up

Status
Not open for further replies.

rwbaird

Technical User
Aug 12, 2003
1
US
I have RedHat 7.3 workstation running. I want to use my W98 PC running TCPIP to FTP files off the Linux box to my W98 box. FTP works ok into the internet. But I want to simply transfer bewteen computers. Help. Thanks.
 
Would you rather not ftp the files from Linux to Windows?

# -----------VARIABLES ------------


# FileName
export FILENAME=testftp.doc

# File Location
export FILELOC=/home/lprd/Scripts

# Archived File Location
export ARCHLOC=/home/lprd/Scripts/archive

# EMail Recipient to receive FTP Log Report
export MAILADDR=XXX@XXX.XXX

# FTP Settings
export FTPSERVER=xxx.xxx.xxx.xxx
export FTPDIR=/home/rzs0502
export FTPUSER=rzs0502
export FTPPASS=xxxxxxx


# -------- END VARIABLES ---------



# Go to file location
cd $FILELOC

# Check for specified file
for TmpFile in `ls $FILELOC`
do
if [ $FILENAME = $TmpFile ]
then
#FTP File
ftp -i -v -t -n $FTPSERVER <<-EOF > FTPLog.txt
user $FTPUSER $FTPPASS
bin
hash
cd $FTPDIR
put $FILENAME
bye
EOF
# Move File to Archive
export ARCFILE=$FILENAME.`date '+%d%m%Y.%H%M%S'`
mv -f $FILENAME $ARCHLOC/$ARCFILE
# Email status
mail -s $ARCFILE $MAILADDR < FTPLog.txt
fi
done
 
Or if you wish to use the DOS FTP...

&quot;ftpbatchfile.bat&quot;
FTP.EXE -s:ftpconfig.txt

&quot;ftpconfig.txt&quot;
open 192.168.10.4
root
Qwer.ty
hash
bin
get update.zip
bye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top