I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2011-05-03 14:48:58.687919-07 by mlt in response to 8558
Re: How to change file creation date?
I know it is an old post but I came across it while having the same problem. While there are some difficulties on *nix, it is possible on Win32. Here is a tiny perl script that fixes file creation date in current directory:

use Win32API::File::Time qw{:win}; use Image::ExifTool qw(:Public); use Date::Parse; opendir(DIR, "."); @files = readdir(DIR); close(DIR); foreach $file (@files) { next if $file !~ /.+\.jpe?g$/; my $tag = "CreateDate"; $values = ImageInfo($file, $tag); $value = $$values{$tag}; # can be a different name !!! # http://search.cpan.org/~exiftool/Image-ExifTool-8.50/lib/Image/ExifTool.pod#ImageInfo print "Setting $file file creation date to $value\n"; $time = str2time($value); if (! SetFileTime($file, undef, undef, $time) ) { warn "Error occured: $^E\n"; } } print "Done!\n";
Direct Responses: 13327 | Write a response