LoginSignup
0
0

More than 3 years have passed since last update.

[mac][command]まとめフォルダを作って画像をまとめる

Last updated at Posted at 2019-09-29

画像(jpeg/jpg)をまとめるだけのツール(command)

※メモ書き

コマンドファイルが置かれている箇所に
以下のようなフォルダ配置になっていた場合に、


|matome.command
|-テストフォルダ
 |-test.jpg
 |-test2.jpg
|-テスト2フォルダ
 |ーtest3.jpg

実施すると以下のようになります。

|matome.command
|-テストフォルダ
 |-test.jpg
 |-test2.jpg
|-テスト2フォルダ
 |ーtest3.jpg
|-まとめ
 |-test.jpg
 |-test2.jpg
 |ーtest3.jpg

※同一の名称の画像ファイルがあると上書きしてしまったりします。
 ↑
 あまり頻繁に発生しないので、とりあえずやってません

matome.commnad

var="まとめ"
CURRENT=$(cd $(dirname $0) && pwd)
cd $CURRENT
mkdir $var
cp ./*/*.jpg ./$var
cp ./*/*.JPG ./$var
cp ./*/*.jpeg ./$var
cp ./*/*.JPEG ./$var
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0