Hey, I’m getting a strange error with a fairly straightforward GetFiles method - it seems like for some reason the method confuses the boundaries between folder Path and search pattern. Please take a look:
It seems like it doesn’t identify the comma separating arguments correctly, and includes part of the search pattern in the folder path. Why is that? Appreciate all help
Are you sure that your filenames contain slash? Slash is usually an illegal character in filenames in Windows/Linus/MacOS since it’s being used as directory separator.
But pdf doesn’t solve the search pattern, I need other variables there - so
Directory.GetFiles(“Folder Path”,".pdf") is not enough,
It also doesn’t explain why the Method takes whatever is after the comma (being second argument) as path folder (first argument)
Yes, analyzed it once again and it’s definitely the slash - must have influenced the Directory.GetFiles that it instead of giving out message “illegal character in search pattern”, it twisted into thinking that name of the file is part of the folder name itself.