Hi. I'm trying to upload a file from a list item attachment, or update it if it already exists. After thinking I wasn't configuring certain actions in my flow correctly, I now think that I have some filename problems to deal with.
Apparently, some actions can't handle a filename with a plus-sign ("+") in the title. (I work in a laboratory environment, and the task of controlling names of technical documents is near impossible.) This doesn't affect the initial upload, but it seems to be a big obstacle when checking if it already exists, i.e. using it (successfully) as a "File Identifier" parameter.
I'm using "Get File Metadata Using Path" action to see if the file exists. If it doesn't, it throws an error and I can use the Run After Previous Step settings on the next step to upload it as a new file (after it fails to get metadata) and similarly set the next step that to Update it instead (which is the only option when trying to replace an existing file.)
Everything goes well until I try to use the file name as part of the File Identifier when using the Update File action. As I said, I can use my Pathname variable that I created to update most files. But if there is a "+" in the title, the error tells me the file doesn't exist, and the filename shown in the resulting error message has the "+" replaced with a space. (I wouldn't normally think that's just a side effect of the JSON data, as possibly a red herring, but I've proved repeatedly that a filename sans "+" works fine.)
There's no problem checking for a file (i.e. using it for the "Path" value); but it clearly doesn't work using it as the semantically-ambiguous "File Identifier" in the Update File action (even though the path as a string works fine for that parameter otherwise.) Can anyone think of a workaround? Is there a way to encode that character in a friendly way, perhaps using the Replace function? Is there a list of other characters that will cause that problem? (It's not a Windows filename issue, since Office apps and SharePoint seem totally fine with it otherwise.)
Thanks in advance for your help!
Hi @mboonie
Could you please post a screenshot of your flow? Also the sample filename which fails.
Thanks
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1