JackTheRussel
Programmer
Hi.
I have program, which first removes all music files from folder /home/xxxx/folder.
Then there will be saved some new files:
Example
Now when I look my error_log, there are multiple errors:
rm: cannot remove /path/*.wav No such file or directory...
Is there any 'if exists' options here?
I looked man pages, but rm command does not include that kind of option.
How could I prevent these error messages?
I have program, which first removes all music files from folder /home/xxxx/folder.
Then there will be saved some new files:
Example
Code:
system("rm $music_dir/*.wav");
system("rm $music_dir/*.mp3");
Now when I look my error_log, there are multiple errors:
rm: cannot remove /path/*.wav No such file or directory...
Is there any 'if exists' options here?
I looked man pages, but rm command does not include that kind of option.
How could I prevent these error messages?