Wechat_video_capturer

Christians-iMac:Wechat_video_capturer chunrix$ cat wechat_video_capturer.sh
#!/bin/bash

#Define wechat default user folder
#wechat="$HOME/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/Wechat/1.2"
wechat="$HOME/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat"
#Define where to place the copied video files
dst_dir="$HOME/Desktop/wechat_videos"
dst_dir2="$HOME/Desktop/wechat_images"

#check if destination folder exists, if not, create one.
[ ! -e $dst_dir ] && mkdir -p $dst_dir
[ ! -e $dst_dir2 ] && mkdir -p $dst_dir2

file_count=$(find "$wechat" -name .mp4 | wc -l)
echo "Total videos will be copied:$file_count files"
file_count2=$(find "$wechat" -name "
.jpg" ! -name "*thumb.jpg" | wc -l)
echo "Total images will be copied:$file_count2 files"

#Find out files from wechat cache folder, then copy 'em into 'wechat_videos folder'.
find "$wechat" -name .mp4 -exec cp {} $dst_dir \;
find "$wechat" -name "
.jpg" ! -name "*thumb.jpg" -exec cp {} $dst_dir2 \;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章