The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

File::Irenamer - Perform interactive filename changes from within an editor

SYNOPSIS

  use Irenamer;

  InteractiveRename();
  InteractiveRename(verbose);
  InteractiveRename(recurse);
  InteractiveRename(debug);
  InteractiveRename(recurse,verbose,debug);


  Recognizes up to three optional switches:
    -d debug mode
    -r recurse mode
    -v verbose mode


  E.g. 

    $ perl -MFile::Irenamer -e 'InteractiveRename()' 
    $ perl -MFile::Irenamer -e 'InteractiveRename(verbose)' /tmp/mydir


    or via a separate script:

    $ cat mytest.pl
    #!/usr/bin/perl

    use strict;
    use warnings;
    use File::Irenamer;

    InteractiveRename();


    $ mytest.pl -dv ~/mydir

DESCRIPTION

Interactive file renamer module allows filename changes from within your favorite editor.

It is most useful when complicated or one-time repetitive changes to a directory or directory tree must be made but programmatic solutions are probably not worth the time to implement. Defaults to 'do not recurse'.

It exports a single function called InteractiveRename()

It assumes a Unix-like environment that exports $EDITOR. If you're on Win32, Cygwin works well. Otherwise you can try to set $ENV{EDITOR} in the code that calls InteractiveRename().

Verbose mode is highly recommended, at least initially, since there is no prompting nor undo available.

EXPORT

None by default.

TODO

Code is blissfully unaware of filesystem permissions.

Tempfile creation is not craker-proofed.

SEE ALSO

Perl's rename function

www.vim.org

AUTHOR

Robert S. Heckel Jr., <bheckel@gmail.com<gt>

COPYRIGHT AND LICENSE

Copyright (C) 2004 by Robert S. Heckel Jr.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.

I've used this code reliably for quite a while but, as you'd expect, I cannot take responsibility for any damage to your files (or your foot should you choose to shoot it) so obviously use it at your own risk.