Announcement

Collapse
No announcement yet.

Moving Multiple Files...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Moving Multiple Files...

    Hello,
    I need to move one .jpg file to 137 folders and for the life of me I can't remember how to do this in Dolphin or Konqueror. Is there a separate program for making this task easy or am I missing something (I know, I'm missing something)!


    Thanks for the help!!!!

    #2
    Re: Moving Multiple Files...

    I think probably the easiest way would be to use the find command. For instance, to copy the file "cover.jpg" into all subfolders of the current folder you can do:

    Code:
    find ./* -type d -print -exec cp cover.jpg {} \;
    If the problem is a little more complicated you can use a script similar to the following:

    Code:
    #!/bin/sh
    
    for dir in *
    do
      if [ -d $dir ]
      then
        cp cover.jpg $dir
      fi
    done

    Comment

    Working...
    X