vidir
Edit filenames in a text editor
TLDR
SYNOPSIS
vidir [-v] [files|directory]
DESCRIPTION
vidir opens a list of filenames in a text editor, where each line contains a number and a filename. Editing the filenames renames the corresponding files, and deleting lines removes them. All changes are applied when you save and quit the editor.This approach leverages familiar editor features like search-and-replace, macros, and multi-cursor editing for powerful batch renaming operations that would be tedious with individual mv commands.
PARAMETERS
-v, --verbose
Verbose output.files
Files to edit.directory
Directory to edit.
ENVIRONMENT
EDITOR - Editor to useVISUAL - Visual editor
EXAMPLE
Editor shows:
2 file2.txt
3 old_name.doc
2 document2.txt
3 new_name.doc
CAVEATS
Part of the moreutils package. Deleting a line removes the file permanently. Do not change the line numbers at the beginning of each line. Use -v to see what operations are performed.
HISTORY
vidir is part of moreutils by Joey Hess. It provides intuitive file renaming using familiar editor interfaces.
