FTP from list help, using an old post


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting FTP from list help, using an old post
# 1  
Old 02-11-2010
FTP from list help, using an old post

I am trying to use this old post from bbabr about ftp and I am running into a little snag with the second part of the todo.lst.
for some reason the password is not being accepted. Here is the original code that was posted here some years back.
I am having problems with this piece so far: echo >>todo.lst user [user] [password]


Quote:
Originally Posted by bbabr

That did the job!

I managed to get the file list, create the todo.lst and run it. One thing I found, though, is that you have to delete the todo.lst after running the script. If not, the next time you run it, it will append to the file.

Below is the script I have. Any comments and suggestions on making it better would be greatly appreciated.
Code:
#!/bin/sh
clear
# change local directory
cd [local-directory]

#collect file names
ftp -ni ftp.abccompany.com <<EOF
user [user] [password]
cd /OUT
mls W945*.* list.txt 
quit
EOF

# create ftp action list
echo >>todo.lst user [user] [password]
while read N
do
    echo >>todo.lst cd /OUT
    echo >>todo.lst get $N
    echo >>todo.lst rename $N ARCHIVE/$N
done <list.txt

echo >>todo.lst quit

# ftp transfer process
ftp -nv ftp.abccompany.com <todo.lst

# cleanup
rm todo.lst

Thanks again!


---------- Post updated at 01:36 PM ---------- Previous update was at 12:57 PM ----------

Actually the very last part is where I am having the issue: # ftp transfer process
ftp -nv ftp.abccompany.com <todo.lst

How do I recall the todo.lst to transfer the files

---------- Post updated 02-11-10 at 09:52 AM ---------- Previous update was 02-10-10 at 01:36 PM ----------

Has anyone figured out how to recall the todo.lst to actually get the files?
Thanks

Last edited by pludi; 02-10-2010 at 01:29 PM.. Reason: sanitation
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with zenity list on ftp

Hello guys, I am trying to create simple script which will show user GUI and redirect him to folder which he will chose based on his action, the folder is variable which has to be selected by user, the rest of the script updates/copies/removes values in that folder. it is quite simple to... (2 Replies)
Discussion started by: defila
2 Replies

2. Shell Programming and Scripting

FTP to list files

Hi Guys, Am writing a FTP script to download file from a remote server. There are 3 files in the target directory. eg. bfg234.2 vfg345.1 abc123.1 abc123.2 I need to get the file "abc123.2". The number could be increasing everytime.I need to get the latest file. can this be done ? (1 Reply)
Discussion started by: giri_luck
1 Replies

3. AIX

How to list the current ftp connections?

Hello, I need to know How to list the ""current"" ftp connections? the machine is AIX 6.1 Regards Ahmed Amer Cairo,Egypt (5 Replies)
Discussion started by: ahmedamer12
5 Replies

4. Shell Programming and Scripting

List files ftp

I list files on server ftp, and i'm a french man then i have files with accents. When i use wget for a mirroring, the files with accent are not encoded correctly, i have some "%CC%81" instead "é" for example... I have idea to cat the file list and pipe for tr awk or sed but unfotunately nothing... (2 Replies)
Discussion started by: protocomm
2 Replies

5. Shell Programming and Scripting

ftp: get list of file to get. Retrieve and move them

Hi, I need to get multiple files from an ftp server. Once the files have been downloaded, I need to move them to a different directory on the ftp server. I don't know of a command that would enable me to get a file and then move it (assuming I don't know the exact file name) within ftp. I think... (10 Replies)
Discussion started by: bbabr
10 Replies

6. Shell Programming and Scripting

list files on a server ftp

Hello, I would want to list files of an server FTP with the path of the file... i try "ls -R" but ftp don't accept this command... Is it possible with curl command ??? Regards. (5 Replies)
Discussion started by: protocomm
5 Replies

7. Solaris

Screencapture and post to ftp

I have 3 Solaris based systems(All are older versions). I am trying to find out how I can take a screenshot and post it to a FTP Server every 5 minutes or so as the same name so I can just view the updated file each time. I know this is sort of a random request, but it would make my job 35%... (2 Replies)
Discussion started by: Broken08
2 Replies

8. Shell Programming and Scripting

Reading list of files into ftp script

How can I go about getting this done? I have tried and failed with a loop before I start the session and after seeing that I am already in the ftp code block and not bash when I am trying to perform this: #FTP Information ftp_server=xx.xxx.xxx.xx ftp_user=xxxx while read line; do... (1 Reply)
Discussion started by: BkontheShell718
1 Replies

9. UNIX for Dummies Questions & Answers

getting list of directories on windows using ftp

is this possible ? i want to get the complete path of current working directory and folders under that directory ( ignore the files in them ) on windows usingn ftp from a unix box The reason i am asking is because I need to write a script so that whenever a user creates a folder on windows... (0 Replies)
Discussion started by: systemsb
0 Replies

10. UNIX for Dummies Questions & Answers

ftp allow/deny list

OK, let see, i have a Tru64 Unix and need to know how the list of ftp users works and in /etc/ftpusers we have the unauthorized users but when we create a new user i want this users put automatic for deny access ..... where i set when creation of users action put automatic the user in that file?... (1 Reply)
Discussion started by: wbendek
1 Replies
Login or Register to Ask a Question