Skip to main content

Thread: Command to copy files in subfolders to one folder


okay have bunch of images set this:

- images
-- folder 1
-- folder 2
-- folder 3
... etc

in each folder there tonne of images. want able copy images in each folder folder called "all" can activate slideshow using gthumb images, instead of 1 folder.

open each folder manually , copy everything, paste "all" folder, repeat. time consuming, , there must command line way

code:
cd images
that parent directory, 1 want images in.

code:
find ./ -name '*.jpg' -exec cp '{}' ./ \;
this assumes images end .jpg file extention.

if there images in sudirectories, have different file extensions .png .jpg .jpg .jpeg etc then

do not in home directory or have right mess on hands


|
|
|
v

code:
find ./ -type f -exec cp '{}' ./ \;
move file in subdirectories 1 you`re in.

can rename parent folder "all"
alternatively use feh create slideshow.

code:
sudo apt-get install feh
then
code:
feh -fzr -d 5 ~/images
this create slideshow. f fullscreen, z random, r tells feh go through directories recursively , d specifies time each picture displayed before changing next one. time in seconds example delay pictures 5 seconds.

known making typos, test code first.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] Command to copy files in subfolders to one folder


Ubuntu

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts