I would like to erase all the files in the directory a/b but those with a .zip suffix.
Since:
unlink glob('a/b/*.zip');does deletes all the files with .zip suffix, I though that:
unlink glob('a/b/!(*.zip)');could erase all the files but those with .zip suffix.
But it does not work: it deltes no files.
Any suggestion please?
In reply to Beginner question about files deletion by hilbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |