Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
viele Dateien umbenennen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Thu Jan 01, 2015 10:26 am    Post subject: viele Dateien umbenennen Reply with quote

Wie ist es möglich viele Dateien aufeinmal umzubenennen?

Aus Leerzeichen sollen Unterstriche werden.
Punkte sollen in Unterstriche umbenannt werden, ausser am Dateinamenende.
ä, ö und ü sollen in ae, oe und ue umbenannt werden.
Grossbuchstaben sollen in Kleinbuchstaben umbenannt werden.
Dateien wo Zeichen vorkommen die ich hier nicht aufgelistet habe, sollen unverändert bleiben.

Wie lässt sich soetwas realisieren?
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2545
Location: Konradsreuth (Germany)

PostPosted: Thu Jan 01, 2015 4:01 pm    Post subject: Reply with quote

Mit Bash und grep/sed/awk.

z. B.:
Code:
for i in *; do
    if [[ dein test hier ]]; then
        newName=$(deine Konversion hier)
        mv "$i" "$newName"
    fi
done

Oder in mehreren Verzeichnissen auch via find | xargs.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Jan 01, 2015 5:05 pm    Post subject: Reply with quote

Oder eines der vielen Programme mit "rename" im Namen. Zu finden im Portage Tree.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum