Skip to main content
added 32 characters in body
Source Link
Gilles Quénot
  • 36.7k
  • 7
  • 74
  • 97

Try doing this :

mkdir ../new_dir
find . -type f -name '*.epub' -exec mv {} ../new_dir/ +\;

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir ../new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        base="${a##*/}"
        mv "$a" "../new_dir/${a%base%.epub}_$(printf %.03d $c).epub"
    done

Try doing this :

mkdir ../new_dir
find . -type f -name '*.epub' -exec mv {} ../new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir ../new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "../new_dir/${a%.epub}_$(printf %.03d $c).epub"
    done

Try doing this :

mkdir ../new_dir
find . -type f -name '*.epub' -exec mv {} ../new_dir/ \;

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir ../new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        base="${a##*/}"
        mv "$a" "../new_dir/${base%.epub}_$(printf %.03d $c).epub"
    done
added 20 characters in body
Source Link
Gilles Quénot
  • 36.7k
  • 7
  • 74
  • 97

Try doing this :

mkdir ../new_dir
find . -type f -name '*.epub' -exec mv {} ../new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir ../new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "$"../new_dir/${a%.epub}_$(printf %.03d $c).epub"
    done

Try doing this :

mkdir new_dir
find . -type f -name '*.epub' -exec mv {} new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "${a%.epub}_$(printf %.03d $c).epub"
    done

Try doing this :

mkdir ../new_dir
find . -type f -name '*.epub' -exec mv {} ../new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir ../new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "../new_dir/${a%.epub}_$(printf %.03d $c).epub"
    done
added 269 characters in body
Source Link
Gilles Quénot
  • 36.7k
  • 7
  • 74
  • 97

Try doing this :

mkdir new_dir
find . -type f -name '*.epub' -exec mv {} new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "${a%.epub}_$(printf %.03d $c).epub"
    done

Try doing this :

mkdir new_dir
find . -type f -name '*.epub' -exec mv {} new_dir/ +

Try doing this :

mkdir new_dir
find . -type f -name '*.epub' -exec mv {} new_dir/ +

if all the files are named name.epub, then you need to increment a variable like this (using )

mkdir new_dir
find . -type f -name '*.epub' |
    while read a; do
        ((c++))
        mv "$a" "${a%.epub}_$(printf %.03d $c).epub"
    done
Source Link
Gilles Quénot
  • 36.7k
  • 7
  • 74
  • 97
Loading