I have a few files in pdf format with the "/" character which they will not sync. getting an error

payment 2?28?17.pdf.FnILj5" failed: Invalid argument (22)

It appears the / is not recognized. If I change it manually to a . it will recognize and sync. any way to batch change those pdfs?

  • 2
    Do you have a '/' character in a filename? This is not a legal filename (all characters are allowed except '/' and null. If you are syncing from some other OS to Linux try renaming the source file. – muclux Feb 2 '18 at 19:30
  • 1
    Yea, you can't have a / in a file name, at least on Linux or Windows. Did this come from a Mac or something? Maybe it allows it. – psusi Feb 2 '18 at 19:33
  • @muclux, psusi, one of You could improve it a bit and post a comment as an answer in my humble opinion. I don't think anything would be possible with the file which name is just not acceptable as it's rather a path than a name. Renaming seems like only possible solution. – kcpr Feb 3 '18 at 2:49
  • I’m migrating to Linux from Mac..have a ton of PDFs which I saved the date as month/day/year.....is there a way to batch change? – orcas Feb 3 '18 at 6:28

In Linux you can't have a '/' character in a filename as this character is used for folders. So you have to rename the files before syncing them to a Linux file system.

I don't know about scripts in MacOS but there is certainly a possibility to rename all your files with a script (e.g. to month_day_year...). If you can't do it yourself you could find help in the Super User community.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.