in reply to delete file
Also make sure you're in the right directory when you use relative paths.
And there's no need for a loop, unlink accepts a list of files to delete as arguments.