I get this error because the file could not be found. I was wondering why the type of file is “File”.
What I did was I used the Assign activity to read the files in the Download folder.
I saved that file directly from a web. It says in the Save as type as “Text Document” but when I look for it in it’s path folder, the type of file turned out to be a “File” type and not .txt file.
You can declare the variable filename =path.GetFileName(file.ToString). This will return the filename instead of full file path.
in for each loop you can get the file extensions by declaring a variable Path_extension= path.GetExtension(filename) , and then print out each file extension value, here you can check each file extension.
3.After getting to know each file’s extension you can pass the same extension in your code.
Turn on the check box in Windows for “File name extension” so you can actually see what the file extension is. If a file does not have any extension Windows marks its type as “File” (see image below)
So if you’re using an extension of .txt or .file when you call the file, it will fail because it doesn’t exit.