curl ftp script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting curl ftp script
# 1  
Old 08-29-2010
curl ftp script

Hello - I'm a novice, so apologies if this is a stupid/answered question.

I'm operating on a mac, and I'm using ftp to transfer files to my computer. The files have atypical names, although I have a list of them, addresses included. Is there a way to automate this using curl?

That is to write a script with curl that does 1. ftp to a password-protected account, 2. read in list of files, 3. get the files. I've spent a few hours reading the curl man page and experimenting, but I'm just as lost as a few hours ago. I'm copying over hundreds of files...

Thanks in advance.
# 2  
Old 08-31-2010
bump.
# 3  
Old 09-01-2010
Could you post the format of the file list you have, and maybe what you've tried so far? Personally, I'd say this sounds more like a job for wget than curl, but I might be wrong.
# 4  
Old 09-03-2010
The file list is a matlab variable. I'm very new to shell. Really, I just tried to use the curl man page and got lost; I don't remember what I did.

Thanks for suggesting wget. It looks much better. I'll try it. Thanks again.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using curl in bash script

Hello. I have pick up a script from internet to track errors from curl command. #!/bin/bash # URL_TO_TEST="http://www.xxxxxx.yyy" MY_VAR=curl_init("$URL_TO_TEST") ; curl_setopt($MY_VAR, CURLOPT_HEADER, 1); curl_setopt($MY_VAR, CURLOPT_RETURNTRANSFER, 1); curl_setopt($MY_VAR,... (2 Replies)
Discussion started by: jcdole
2 Replies

2. UNIX for Dummies Questions & Answers

How to download files matching pattern from FTP using CURL or WGET?

Hi, For an order I requested, the provider has uploaded a tar file in public FTP site which internally has tons of files (compressed) and I need to download files that follows particular pattern which would be few hundreds. Note: The order can't be requested for files that follows the... (7 Replies)
Discussion started by: Amalan
7 Replies

3. Shell Programming and Scripting

Curl ftp ssl download files

Hello all, I have been struggling with this issue on and off for a couple of weeks now and I just got it all working, so I wanted to share my findings in case some other poor soul needs to know how. First some background on what I'm doing. I am uploading files to different directories based on... (0 Replies)
Discussion started by: msjkadams
0 Replies

4. Shell Programming and Scripting

Using CURL in a script

Hi all so I'm new to scripting but I am making a script that is a url shortener. It will take a url off the command line and spit back the shortened version using bit.ly's api this is what I have so far if then echo "You must supply a URL." exit 1 fi read url... (3 Replies)
Discussion started by: subway69
3 Replies

5. Shell Programming and Scripting

Using CURL for FTP

Hello, I am using curl command to interact with the FTP server. I have gathered some information around downloading / uploading of files using curl command. However, I couldn't find any information around 1) Listing all the files on FTP server in any given folder having a specific extn. (... (3 Replies)
Discussion started by: amitshete
3 Replies

6. Shell Programming and Scripting

Curl ftp upload success but no file exist on the server !!!!

hello, I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command upload files... (5 Replies)
Discussion started by: laraaj
5 Replies

7. Shell Programming and Scripting

FTP using cURL

Hi I am trying to fetch a file from a remote location and download it into a local directory ...i was previously doing it quite simply using ftp but now i need to do the same using the cURL tool ...Here i am not getting an option to specify a directory name i am trying the following but... (0 Replies)
Discussion started by: jamshedj
0 Replies

8. Shell Programming and Scripting

using curl in a script

Hello everyone I'm currently using a script to upload files (different file names, but same date) to an ftp server (see below) #!/bin/sh # Set the variables HOST=<host> USER=<user> PASSWD=<password> ftp -i -n $HOST <<END_SCRIPT user ${USER} ${PASSWD} mput... (0 Replies)
Discussion started by: soliberus
0 Replies

9. Shell Programming and Scripting

help with curl using ssl to ftp file

Currently I am trying to download a file from a secure site that I do not control. I need to use a pem cert to get past their firewall. Currently I am trying to use curl to get the file and return it using the following information pemcert.txt containing the cert, username, password, domain,... (0 Replies)
Discussion started by: gandolf989
0 Replies

10. UNIX for Dummies Questions & Answers

cURL Active FTP Download

Hello, I know this is probably a very silly question for most but how to do I force curl to do active FTP downloads? Thank you Dallas (2 Replies)
Discussion started by: Dallasbr
2 Replies
Login or Register to Ask a Question