Remove folder with non-ASCII filenames with PHP on windows machine

111 views Asked by At

I Would like to remove a directory from a windows OS using PHP. I have written a recursive function to find all files in the directory, and normally this works.

However, in one of the directories, there is a file with japanese characters in its name. When using scandir() it shows up as ???????????????.mp4 and using unlink on that direct output of scandir produces an error of "file not fount".

So: How to remove a directoy which contains files with japanese (or other non-ASCII) characters in its name?

  • Is it even possible to do this with PHP (any version...) under Windows?
  • Is there a way to remove the directory w/o deleting the files first?

Thank you!

0

There are 0 answers