ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

downloading multiple files with ftp

book

Article ID: 240515

calendar_today

Updated On:

Products

CA Workload Automation AE

Issue/Introduction

Hi,

This is regarding ftp job.

We have day-to-day operations where file name changes daily....something like YYYYMMDD_file.txt (20220426_file.txt, 20220427_file.txt) which will be changing daily that needs to be downloaded. But I don't see this can be done after looking thru the autosys documentation.

https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/autosys-workload-automation/12-0-01/reference/ae-job-information-language/jil-job-definitions/ftp-local-name-attribute-specify-local-filenames-within-an-ftp-job.html

is there a way to specify remote file like this...ftp_remote_name: 202204*_file.txt

and download location "ftp_local_name: /home/svcschedulerdev/" so that it keeps all the file name?

Thanks.

insert_job: Test_FTPS_Ndrive    job_type: ftp
machine: <machine name>
owner: [email protected]
application: Test-Python1
alarm_if_fail: y
alarm_if_terminated: y
send_notification: n
ftp_server_name: 10.51.8.22
ftp_server_port: 21
ftp_user_type: Simple
ftp_transfer_direction: DOWNLOAD
ftp_transfer_type: A
ftp_local_user: svcschedulerdev
ftp_local_name: /home/svcschedulerdev/
ftp_remote_name: 202204*_file.txt

Environment

Release : 12.0

Component :

Resolution

https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/autosys-workload-automation/12-0-01/reference/ae-job-information-language/jil-job-definitions/ftp-remote-name-attribute-specify-remote-filename-within-an-ftp-job.html

If a wildcard is used for the remote file name, the corresponding local file name (the target) must refer to a directory. In this example, the directory is WC.
 
insert_job: FTP_WILDCARD  job_type: FTP
machine: ftpagent
ftp_server_name: hprsupp
ftp_server_port: 5222
ftp_transfer_direction: DOWNLOAD
ftp_transfer_type: A
ftp_remote_name: /u1/files/scripts/r*
ftp_local_name: /export/home/ftpfiles/ftpdata/WC
owner: [email protected]

Note: In customer's case, the path for the ftp_remote_name was missing.

Changing "ftp_remote_name: 202204*_file.txt" to "ftp_remote_name: 202204*_file.txt" resolves the issue.