Skip to content

Commit

Permalink
rename2dirname.sh: make it easier to rename to final filenames with v…
Browse files Browse the repository at this point in the history
…idir
  • Loading branch information
trapd00r committed Aug 24, 2023
1 parent 991d0e7 commit 4604626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rename2dirname.sh 100644 → 100755
@@ -1,3 +1,3 @@
#!/bin/sh
# rename files in subdirs to the name of the subdir_originalfilename
for f in */* ;do fp=$(dirname "$f"); fl=$(basename "$f"); mv -v "$fp/$fl" "$fp/$fp"_"$fl"; done
# rename files in subdirs to the name of the subdir_____originalfilename
for f in */* ;do fp=$(dirname "$f"); fl=$(basename "$f"); mv -v "$fp/$fl" "$fp/$fp"_____"$fl"; done

0 comments on commit 4604626

Please sign in to comment.