Share via

Copy file from one storage to another using file name timestamp (Specifically yesterday file)

Venkatesh Srinivasan 86 Reputation points
Nov 11, 2021, 6:08 PM

Hi,

I'm new to ADF, Just wondering how to copy file using filename (timestamp) especially yesterday timestamp basically previous date file.

My file name will be like : 21102531021_152fced6.xml

Please help me out here.

Thanks in advance.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,299 questions
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,516 Reputation points Microsoft Employee
    Nov 12, 2021, 1:51 PM

    Hi @Venkatesh Srinivasan ,

    Thank you for posting query in Microsoft Q&A Platform.

    You should consider having your wildcard file name as 2147110147_*.xml so that all files with that date will be copied.

    Below expression helps you to get your wild file name as above.
    @concat(formatDateTime(adddays(utcnow(),-1),'yymmddhhmm'),'_','*.xml')

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.