I have a file named “my file.pdf” and I can’t delete this file with this code:
if (remove("/var/tmp/\"my file.pdf\"") != 0)
printf( "Error deleting file\n");
Any suggestion different than do some regex to replace ‘{whitespace}’ for ‘\{whitespace}’?
The remove() function does not use regexes. Does your file really contain quote characters as well as spaces? If not, and if the file contains a single space then:
should work.