When I tried your script (on linux as normal user), it worked.
You should check if the system call was successful before you delete a source file
Better would be to use opendir to get at the files (without the hackish renaming step) and do the "convert, check if successful, delete source" steps together for each file. Use escaping (i.e. put one or two \ before a space) or surround the filename with ' or " in the system call and it will work with spaces too.
In reply to Re: Why does this only work correctly as root?
by jethro
in thread Why does this only work correctly as root?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |