Once again I am here with a simple problem which is hard enough to solve by myself:
I got the following keys in an array:
20110225104849 20110225104833 20110225104848
And following files in a folder:
google_20110225091600.7z google_20110225091622.7z google_20110225100306.7z google_20110225100410.7z google_20110225104833.7z google_ready_20110225100410.txt google_ready_20110225104833.txt Yahoo_20110225091639.7z Yahoo_20110225100320.7z Yahoo_20110225100424.7z Yahoo_20110225104849.7z Yahoo_ready_20110225100424.txt Yahoo_ready_20110225104849.txt Community_20110225091637.7z Community_20110225100318.7z Community_20110225100422.7z Community_20110225104848.7z Community_ready_20110225100422.txt Community_ready_20110225104848.txt
I should unlink/delete all the files from the folder except those which is/are carrying the keys in the filename.
Can I use a for loop? for match and delete? Or any handy shortcut?