-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathftpupload
More file actions
39 lines (33 loc) · 714 Bytes
/
ftpupload
File metadata and controls
39 lines (33 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
echo "
Guide on how to use FTP to download or upload file
---------------------------------"
echo "Just use command: ftp hostnamehere
Then after login do: ls
then: cd foldername
then: put /path/to/file
or: get filenameonftp
OR use following script to be guided to upload a file. To quit, do Ctrl+C"
echo "
Script to upload File to a FTP
---------------------------------"
echo "Local file path:"
read FILE
echo "Host/IP"
read HOST
echo "File path on FTP: (example: images/wallpapers/)"
read FTPPATH
echo "Username:"
read USER
echo "Password:"
read PASS
#HOST=MYFTPHOST
#USER=USERNAME
#PASS=PASSWORD
#FTPPATH=FTPPATH
#FILE=FILEPATH
ftp -inv $HOST << EOF
user $USER $PASS
cd $FTPPATH
put $FILE
bye
EOF