Write a cURL script to automatically transfer file to FTP site each night

We have a need to automatically upload a file to an FTP site on a nightly or weekly basis. The file needs to be uploaded through a cURL script. Here are the instructions provided to us.

To upload subscription data from a file using a command-line interface, follow this general procedure:

1. Set up a license in the Admin Tool for your Person identity to access the directSubscriptionUpload

content slice (Section 5.1 - see below).

2. Create the upload file in the specified format (Section 5.2 - see below).

3. Create a cURL cookies file (Section 5.3 - see below).

4. Upload the file using an upload utility that can send HTTPS POST messages, such as cURL

(Section 5.4 - see below).

5. Check the status of the file upload and processing (Section 5.5 - see below).

Before you begin, set up an HTTPS POST utility (such as cURL). To download a version of cURL

appropriate for your operating system (use the non-SSL version), refer to:

[url removed, login to view]

Note: Our Operating System is Windows Server 2003.

5.1. Set Up a License

This procedure only needs to be done once.

1. Create a Person identity.

If needed, create a Person identity, including username and password, for the user performing the

direct subscription upload.

2. Create a Service content slice.

a. In the Admin Tool, click the Content Slices sidebar button and select Service from the Content

Type drop-down.

b. Enter directSubscriptionUpload in the Service Name field and click Search.

c. If no results are found, click OK, enter a description of the service in the Description field, and

click Create.

3. Create a license.

a. In the Admin Tool, click the Licenses sidebar button and click into the Create One-off Licenses


b. Create a license using the directSubscriptionUpload content slice and the Person identity

created above (refer to the Licenses User Guide).

5.2. Create the Subscription Upload File

Create a subscription upload file in the custom format required for your platform (Section 2.7).

5.3. Create a Cookies File

Create a cookies file with cURL login information. For example:

curl -c [url removed, login to view] -b I2KBRCK=1 -d login={username} -d password={password} https://


where {username} and {password} are the attributes of the Person identity, and {host} is the Literatum

website. This command stores the session cookies in cookies.txt.

This only needs to be done once per session.

5.4. Upload the Subscription File

Next, use a web form or a command-line HTTPS utility such s cURL to make a POST call to the upload


Assuming you have created a cookies file named [url removed, login to view], upload the subscription file using the

following command:

curl -b [url removed, login to view] -F file1=@C:\{uploadFile}.txt -F format={subscriptionFileFormat} -F

email={myEmailAddress} https://{host}/action/directSubscriptionUpload

where you replace:

• {uploadFile}.txt with the name of the upload file. Include the @ (at) symbol and the directory path

of the file.

• {subscriptionFileFormat} with the subscription file format name as found in the Admin Tool (in

the File Format drop-down menu). If the format name contains spaces, enclose the name in double

quotes (e.g., "Eclipse Institutional Subscriptions").

• {myEmailAddress} with the email address to which notification of the status of the subscription

upload should be sent.

• {host} with the URL of your website.

For example:

curl -b [url removed, login to view] -F file1=@C:\Users\BJohnson\[url removed, login to view] -F format="Eclipse

Institutional Subscriptions" -F email= [url removed, login to view]


5.5. Direct Subscription Upload Status

If an error occurs while posting to the direct subscription upload service, an email is sent to all email

addresses specified in the command. Any errors that occurred during processing of the subscription file

can be viewed in the Admin Tool (see Chapter 4).

The direct subscription upload service returns 200 OK if the POST is successful and 500 if an error


Evner: eHandel

Se mere: you need to write a description, write for us 200, windows action script, url download tool, transfer url, notification utility, name transfer, name com transfer, html 5 eclipse, ftp upload utility, from where we can write a content to our website, file download service, enter your email address in the format, ecommerce website for 500, direct file upload, c# call web service https, address write, type of cookies, write instructions, Write chapter 2

Om arbejdsgiveren:
( 14 bedømmelser ) Woodstock, United States

Projekt ID: #5118825

2 freelancere byder i gennemsnit $178 på dette job


Hello, I am John Profit. I work with my partners Marlen and Van at Netronian Inc., in Orlando, Florida. We have great experience with Magento. 80% of our developed websites are Magento websites. We are the masters Flere

$741 USD in 15 dage
(20 bedømmelser)

Dear Client, I can help in your project. We have already experience of working on similar projects. Please see below to get idea of our experience: Amazon/Ebay Bots: [login to view URL] Flere

$206 USD in 5 dage
(6 bedømmelser)

A proposal has not yet been provided

$150 USD in 3 dage
(1 bedømmelse)

Hi There, :) Thanks for taking a minute to read my profile brief. I have just read your requirements and want to work with you. Here is Some REASONS WHY YOU SHOULD HIRE ME. I have full time working experi Flere

$247 USD in 3 dage
(0 bedømmelser)