Post History
I'm trying to bulk-rename files in a directory and its subdirectories. I want to print each file's name before and after renaming, ideally on the same line in the form: original_filename -> new...
#3: Post edited
How can I print both "before" and "after" filenames when batch-renaming with find and perl-rename?
- How can I print both "before" and "after" filenames when batch-renaming files?
#2: Post edited
I'm trying to bulk-rename files in a directory and its subdirectories using `find` and `perl-rename`. I want to print each file's name before and after renaming, ideally on the same line in the form:- ```
- original_filename -> new_filename
- ```
- Right now, my command is:
- ```
- find . -type f -print -exec perl-rename -n 'regex' {} +
- ```
- But this only prints the filenames before they are renamed, not after. I want to see what the new name will be for each file, so I can review changes before running for real.
How can I print both before and after filenames (e.g. `before -> after`) when running a batch rename like this?
- I'm trying to bulk-rename files in a directory and its subdirectories. I want to print each file's name before and after renaming, ideally on the same line in the form:
- ```
- original_filename -> new_filename
- ```
- Right now, my command is:
- ```
- find . -type f -print -exec perl-rename -n 'regex' {} +
- ```
- But this only prints the filenames before they are renamed, not after. I want to see what the new name will be for each file, so I can review changes before running for real.
- How can I print both before and after filenames (e.g. `before -> after`) when batch renaming files?
#1: Initial revision
How can I print both "before" and "after" filenames when batch-renaming with find and perl-rename?
I'm trying to bulk-rename files in a directory and its subdirectories using `find` and `perl-rename`. I want to print each file's name before and after renaming, ideally on the same line in the form:
```
original_filename -> new_filename
```
Right now, my command is:
```
find . -type f -print -exec perl-rename -n 'regex' {} +
```
But this only prints the filenames before they are renamed, not after. I want to see what the new name will be for each file, so I can review changes before running for real.
How can I print both before and after filenames (e.g. `before -> after`) when running a batch rename like this?
