Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # compile script before running to clean up the pre_cci.c or delete pre_cci.c
- use strict;
- my $file;
- my $filecode;
- my $resultcode;
- my $count;
- opendir (DIR, ".") or die $!;
- while (my $file = readdir(DIR))
- {
- # Use a regular expression to ignore files beginning with a period
- next if ($file =~ m/^\./);
- # add to the array
- $filecode = $file;
- $filecode =~ s/sync_bitmap_//;
- $filecode =~ s/\.bmp//;
- $resultcode = system("grep $filecode ..\\..\\*.c > nul");
- if ($resultcode == 0)
- {
- print $filecode . " - FOUND ($resultcode)\n";
- }
- else
- {
- print $filecode . " - NOT FOUND ($resultcode)\n";
- print "cmd /c del $file\n";
- system("cmd /c del $file");
- }
- #push (@files, "$file<br />");
- $count++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement