cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PipManifold
Resolver I
Resolver I

Flow to create new folders from list in Excel and then copy in files from another folder

Hi there.

I have a list of programs for which I need to create a folder for and then copy the corresponding Excel file from the folder they are saved in into the newly created folder.

 

Here is my test list of programs:

Excel file.PNG

 

Here is what the folder with the excel files in them looks like, they all have the same name except for the program code:

excel reports.PNG

 

This is what I have done so far, however, the create folder part is working great, however, when it gets to the copy file section, it doesn’t like how I’m using the dynamic content and says it can’t identify a file.

 

Error message

Failed to verify the existence of source object at 'https://xxxxxxxxxxxxxx/sites/DSCQualityEnhancement/Shared Documents/CES_SES_GOS/CES/Program Course Mean Summaries/CES Program Course Mean 2020 S2/CES Program Mean Summary (HE) 310P-MC193 (Semester 2, 2020).xls' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.

clientRequestId: 3a13444c-77be-496f-8ced-8889a013dd8a

Flow part 1 edited.PNGFlow part 2 edited.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @PipManifold 

 

Thank you for posting.

 

According to your description, you would like to create folder based on file code and then move file to according folder. But currently got verification error.

 

If that’s the case, I believe the issue is caused by folder path format. The Identifier of the file should encode to URL format, so you should replace these "/" to "%2F". So you could use the replace() function to process the file path, for example:

v-duann-msft_0-1621308925822.png

 

Once tested, I can copy file successfully.

v-duann-msft_1-1621308925828.png

 

v-duann-msft_2-1621308925830.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

5 REPLIES 5
v-duann-msft
Community Support
Community Support

Hi @PipManifold 

 

Thank you for posting.

 

According to your description, you would like to create folder based on file code and then move file to according folder. But currently got verification error.

 

If that’s the case, I believe the issue is caused by folder path format. The Identifier of the file should encode to URL format, so you should replace these "/" to "%2F". So you could use the replace() function to process the file path, for example:

v-duann-msft_0-1621308925822.png

 

Once tested, I can copy file successfully.

v-duann-msft_1-1621308925828.png

 

v-duann-msft_2-1621308925830.png

 

Hope the content above may help you.

 

Best regards,

Anna

Hi @v-duann-msft 

 

Thanks for your help with this.  Unfortunately I've implemented this and there is no luck on my end.  I still get the unable to match error

Fix 1.PNGFix 2.PNGFix 3.PNG

PipManifold
Resolver I
Resolver I

Thanks so much @v-duann-msft .  Did some more playing and discovered it was the spaces not the /s which it was having issues with. Replaced all those with %2b and seems to have done the trick 🙂

 

Thanks for all your help

Hi @PipManifold 

 

Thank you for your attempts.

 

It looks like you input incorrect expression in the last action. It's '%2F' instead of '%F2'. Please help me to modify it.

replace(outputs('Compose_2'),'/','%2F')

replace(outputs('Compose_3'),'/','%2F')

v-duann-msft_0-1621316882104.png

 

I have already checked other settings, seems it's all good except that expression.

 

Hope it helps

 

Best regards,

Anna

Hi @PipManifold 

 

Glad to hear you found the small mistake.

 

Have a great day!  😀

 

Best regards,

Anna

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,653)