Hidden Thumbs.db file

Hi Guys

in the screen below from the immediate panal, there are a file name Thumbs.db and it causes me a lot of error sometimes it copied my file how can i avoid coping this and how can I delete all the rows that contain this word as I made the BOT to write every copied file

Hi,

When you are looping the folder then you can put an if condition to avoid any Thumbs.db file:

CurrentFile.Name.ToUpper.Contains(“THUMBS.DB”)

Thanks

still have the files or maybe i am doing it in a wrong way

also it contains some other files

image

I guess these are hidden files:

Check if File Name contains a tilde character:

CurrentFile.Name.ToUpper.Contains(“~”)

OR
Like this: and Loop on the array
directory.GetFiles(“folder_path”).Except(directory.GetFiles(“folder_path”,“~*”)).ToArray

@omar_ismail

If you need only .png files then use the filter in the for each file in folder activity and give filter as "*.png"

If you need to ignore .db

Then try with Not currentFile.Name.Contains(".db")

Cheers

@omar_ismail plz check manually where this file is residing and whether it’s a hidden file.
Also is it allowed to use powershell or command lines to copy the files instead of using this loop in UiPath? If yes, you can call it in the UiPath flow.

Thanks

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