While moving excel files from "downloads" to a new folder,all files except the last(latest) downloaded file are moving

  1. Downloaded multiple files (.xlsx) from web portal. - success
  2. Moved the recently downloaded files to a new folder (in c drive) using for each loop - success
  3. Only the last downloaded file didn’t move to the required destination. - fail

Added a few seconds delay time but it didn’t work.

Any idea why the last file isn’t there in the required destination while all others are?

@new_user

On what basis you are moving the files and how you are finding recently downloaded files from download folder ?

Hi @new_user,
Welcome to the Community!
I don’t know the method by which you are moving the files but with use For Each loop you need to remember that it is counting from index = 0, so I can only guess that you need to add “+1” somewhere :slight_smile:

It is automatically moving the recently downloaded excel files from “downloads” to desired path. I’m not using any “recent file” formula here. This is how i’m providing the value in ‘assign’ activity

@new_user

As per your expression, it will move all Excel files from downloads to destination folder.

Hi Thanks! can you tell me where should I be adding the index ?

Can you share the workflow you are using to do this? (please remove any sensitive data)

it is picking only the required (recently downloaded excels) and moving the same to the folder 'downloaded files" (as below)

sure! image image

Hi @new_user,

Did you incrementing the loop counter,check it once & see

@new_user,
Try to add delay before For Each loop. I think it might be that your loop is taking list of files so fast that it don’t see the latest file because it’s saving at the same moment. It’s only my thought but worth to check :slight_smile:

I didn’t do that …can you please guide a bit on it?