ACS: Transfer File (Download SFTP) computed file name | Community
Skip to main content
Level 2
Jan 29, 2018 2:15 PM UTC
Solved

ACS: Transfer File (Download SFTP) computed file name

Hello all,

I'm creating a workflow for a client where daily we will download a file from a SFTP server and update AC database.

The file is uploaded to the SFTP server by the client, and it is created automatically and has a dynamic name: file_date.cvs (ie: clients_20180129.csv).

Can I use computed name (dynamic name with date variables) on the file name?

Did anyone have this problem before?

Best

RIck Romero

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
rick_romeroAccepted solution
Level 2
Jan 30, 2018 12:25 PM UTC

Guys,

Just for the record, in case someone come to the same issue.

I tested with <%= formatDate(new Date(), "%4Y%2M%2D") %> and it didn't work. (on AC Standard)

So we can't use the same syntax that we use on AC Classic.

Regard the wild card (*), I also tried, but it only can be used on the last position, as the description says: "File path on the remote server (the * wildcard is accepted in last position)"

So it will only work in case you want to ignore the file extension.

Cheers,

-Rick Romero

5 replies

Level 2
Jan 6, 2021 10:55 AM UTC

Here is the syntax for standard:

"Clientes_"+DateFormat(ToDate(GetDate()),"%4Y%2M%2D")+".csv"

 

 

Translate
rick_romeroAuthorAccepted solution
Level 2
Jan 30, 2018 12:25 PM UTC

Guys,

Just for the record, in case someone come to the same issue.

I tested with <%= formatDate(new Date(), "%4Y%2M%2D") %> and it didn't work. (on AC Standard)

So we can't use the same syntax that we use on AC Classic.

Regard the wild card (*), I also tried, but it only can be used on the last position, as the description says: "File path on the remote server (the * wildcard is accepted in last position)"

So it will only work in case you want to ignore the file extension.

Cheers,

-Rick Romero

Translate
arouillard44
Level 4
Jan 30, 2018 9:59 AM UTC

Henrique,

i'm sure about one thing, if my solution doesn't works, you can use regEx.

it's not perfect, but permit you to use date with Clientes_*.csv

Best Regards,

Translate
Level 2
Jan 29, 2018 7:54 PM UTC

arouillard44​

Thanks, I will test and I will let you know.

For now I asked the client to generate a static filename, but this probably will catch me back again.

Cheers

Translate
arouillard44
Level 4
Jan 29, 2018 3:58 PM UTC

Hello,

I don't know if ACS works like classic on this possibility, but you can try it :

Clientes_<%= formatDate(new Date(), "%4Y%2M%2D") %>.csv


It's an idea,

Regards,

Translate