For each loop error

For each loop is not going inside the moving file whenever I debugging

See if you have any files in the parent directory. The parent directory may be empty. Print the value of parent directory and check if files are present in that location

Yes there is files !

I’m trying to move pdf file from download path but when i debug that time not entering to move file it’s coming out directly

Hi @suraj_gaikwad

What are the warnings showing over there and if possible share the what u have mentioned in assign activity and also the file path to which the current file need to be moved.

I have to from download files to other

@suraj_gaikwad

Please keep a break point on for loop and check the values of str_Downfiles from locals panel…

And can you show your directory.getfiles command please

Cheers

Hi @suraj_gaikwad

Since you are giving the entire path i.e C:\Users\suraj.gaikwad… it’s showing the warning symbol. try giving only the file name that you want to move and not from the root path. I have given screenshot for reference of error. Try giving only file name that you want to move.

Hope it helps!!

Regards,

Hi @suraj_gaikwad

In the Move file activity , remove the variable and use the complete file path and see if the error still occurs.

I’m trying to get recently downloaded file move

@suraj_gaikwad

Your directory.getfiles is not returning any value I beleive because you used INVG*,pdf instead you have to use a dot INVG*.pdf

I hope your file name startswith INVG

Please correct the same…and if the search pattern matches then you would get matching files

Cheers

1 Like

Yeah done !!

Thank you

But one more thing once i have move files after that i have to delete whenever bot run so what to do

1 Like

@suraj_gaikwad

If you are using move file activity then the files in original location would be removed…

Else you can use delete file activity in the same loop after move/copy file activity

cheers

Not quickly first read some specific data from pdf after that delete that all files

@suraj_gaikwad

Then use read and the delete

Or use another loop similar to this one after the activities you want to perform

Cheers

I’m not able to run for each file in folder inside try catch

@suraj_gaikwad

I believe the problem is not for each …I just tried and saw no issue…please check what else is wrong

cheers

How to read multiple pdf files but some specific data ?

@suraj_gaikwad

If you have different questions feel free to open a new topic with more details whcih would help in segregation of issues and would be easy for other who look at thread to understand the issue

cheers

Okay great

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.