Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 2849

General Questions • Re: Command line- rename a series of files

$
0
0
You can use a for loop with the rename or mv command in the terminal. Here’s a bash example:
bash

Code:

for file in *.pdf; do  newname=$(echo "$file" | sed 's/\[Letter\]//; s/\.0N/_N/');  mv "$file" "$newname";done

Statistics: Posted by LouisR4 — 2024-12-12 20:40



Viewing all articles
Browse latest Browse all 2849

Trending Articles