Windows illegal filename characters - can't find the github bug report

I still maintain that this is something that must be addressed. Until then, I created a workaround for myself - maybe this helps others as well, so I will post it here - as well as on github:

Using Flow External Scripts I created the following rule:

When file is created, renamed, copied
and User is not member of Temp-Ban-Group
Run script
rename 's/[\?\<\>\:\@\*\|\$]/_/g' /path/to/datafolder/%n && php /path/to/nextcloud/occ files:scan %o

This replaces any of the offending characters with an underscore, and then rescans the userfolder. This can take a while depending on the amount of files and folders. It also depends on the hardware. In my case I had to install rename with apt install rename.

This also seems to be working with group folders.

Edit: This does NOT work with folder names - only files! Flow currently can’t be triggered by folders being created/uploaded/renamed.

1 Like