Excel Scope Exception File

Hello Friends,
when I run my workflow I get the following error:

In reality I don’t have any file called “’~$20180711.xlsx” in the folder

Do you think how I can solve this problem?
Thank you so much,
Camilla :slight_smile:

@CamiCat Check below link it will clear doubts.

1 Like

Thank you so much.
I tried to set the correct options:
Tools > Folder options > View Tab > Advanced Options Panel > Unmark Show hidden files, folders and drives & mark Hide system protected files.
but it gives me the same error.
Can you help me further?
Thank you so much,
Camilla :slight_smile:

@CamiCat Cut those files with ~$ as prefix and paste it in another folder and try again.

1 Like

The problem is that I cannot find it.
It’s invisible.How can I find it?
Thank you so much,
Camilla :slight_smile:

In your previous solution, it says to mark “Hide system protected files”. To see these Excel files, you might have to unmark this option (as the file might be considered a system file).

Nevermind, the info here is in the provided link above

Those Excel files with ~ in front are temporary files. They show up in the same folder as an open file and they are gone when the file is closed.

It might be, however, that some were left over with the file not closing properly at some point.

1 Like

If you are using excel application scope and if you are running the same excel file multiple times there might be chances of creating that kind of files. Delete the folder where you have saved your excel files and create the folder with the same name and run it.Let me know the status.

1 Like

Hey @CamiCat

Files that begin with a ~ or ~$ are temporary files that are created when you are working in a program such as Word or Excel to temporarily store information in order to free memory for other purposes, or to act as a safety net to prevent data loss when a program performs certain functions.These are helpful in terms of Speed and Data Integrity.

Normally they are deleted when you close the program and usually only remain if the program is not closed properly.

If I am editing a Excel/Word document, for an example, and i will go to the folder I opened the file from I will see a file with the ~ in front of it. Once I have saved and closed Word the file disappears.

The files you are describing are so-called owner files or “lock” files. An owner file is created when you work with a document in Excel/Word, and it should be deleted when you save your document and exit Word. Sometimes these files are left behind, for example if Excel/Word crashes, and you can delete them manually.

Solution of your Problem:

Directory.GetFiles() returns all files, even those that are marked as hidden.

So you are getting this problem :slight_smile:

Try This and let me know :). it will just ignore hidden files to read with GetFiles() .

GetFilesFromDirectoryWithoutHiddenFiles.xaml (7.5 KB)