Skip to content

Commit

Permalink
rename2dirname.sh: initial
Browse files Browse the repository at this point in the history
  • Loading branch information
trapd00r committed Aug 14, 2023
1 parent 55f376c commit 18d953f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rename2dirname.sh
@@ -0,0 +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

0 comments on commit 18d953f

Please sign in to comment.