Moving images

rudolf35

New Member
Joined
Nov 7, 2024
Messages
3
Reaction score
0
Credits
36
First off, I am a terminal noob on Mint 2.2. What I am attempting to do is to find and move large amount of image files from one BU drive to another drive. There is a top folder and multitudes of sub-folder. This is the script I came up with from several older posts from this site:

find /media/rudolf3577/RAID-IMAGES/Move-From -type f \( -iname ".jpg" -o -iname ".jpeg" -o -iname ".png" -o -iname ".bmp" -o -iname "gif" -o -iname "tif" \) -exec mv {} /media/rudolf3577/CLEAN-PICS \;

The from and to dir show in the GUI and in the terminal but when I run this sh file I garnish this error message:

root@Little-Mint:/media# sh pic-find.sh
find: ‘/media/rudolf3577/RAID-IMAGES/KW-LT-Pic-10-04-2024/Move-From’: No such file or directory

I garnish the same error when run as user. I attempted to run this sh from / and right down to the last dir listed in the from portion from each respective dir with the sh file located in the dir I was running it from.
I tested the script on two folders on the desktop, one holding images and the other the receiving folder - the script ran spot on. I the plugged in the path to the larger drives and the error above popped up. What did I mess up?
 
Last edited:


Can you share how you managed that ?

....and Welcome to Linux.org !
 
Sure

find /path/to/search/ /another/path/to/search/ /some/other/path/ -type f \( -iname ".jpg" -o -iname ".jpeg" -o -iname ".png" -o -iname ".bmp" \) -exec mv {} /path/to/move_to/ \;

It came from a post dated 2019. My issue was with the drive mapping. I have it now chewing through 580GB of folders digging out images. I added -o iname "*.tiff" to the list and it digging them out also. What start this was that I had several drives with saved image folders. I combined them on on drive, hence all the sub-folders. Now it is harvesting the image files and putting them on another SDD.
 
Last edited:
FYI, I tested it by making two folders on the desktop, one with images one without. Then I pointed the script at the respective folders and they moved like they should.
 


Follow Linux.org

Staff online

Members online


Top