Author Topic: Copy files without directory structure  (Read 10754 times)

karthik

  • Active Member
  • ***
  • Posts: 56
    • View Profile
Copy files without directory structure
« on: November 15, 2013, 08:35:39 »
I have a root directory and a directory structure inside it. I want to copy all the files in root and its sub directories (recursively) but I do not want the folder/directory structure inside the root directory. How can I do it in MC? Thanks.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4286
    • View Profile
    • Multi Commander
Re: Copy files without directory structure
« Reply #1 on: November 15, 2013, 09:54:43 »
Do a search for * at the location you want to copy from. But in the find files dialog enable attributes matching and uncheck "Directory" (Since you do not want folders in the search rersult)

And select all and copy them to target location

karthik

  • Active Member
  • ***
  • Posts: 56
    • View Profile
Re: Copy files without directory structure
« Reply #2 on: November 15, 2013, 10:13:18 »
How can I do this recursively for all the directories? For example, I have directories named 1, 2, 3, 4... And in each of them I have a different directory structure inside. What I want is to copy the directories named 1,2,3,4... but in the target I do not want to have the directory structure for each of the individual directories. So the target should have a directory named 1, but inside it it should only be files (recursively found from source directory 1) but no directories. I want this to be repeated for all directories 1,2,3,4... Is there a way to get it done?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4286
    • View Profile
    • Multi Commander
Re: Copy files without directory structure
« Reply #3 on: November 15, 2013, 11:00:40 »
So you want to keep the main folder but not the subfolders?
Well that is such a unique senario so I dont think you can do that automatic.

I think you need to do the search thing for every folder. Maybe you can use script to automate it a bit.

karthik

  • Active Member
  • ***
  • Posts: 56
    • View Profile
Re: Copy files without directory structure
« Reply #4 on: November 15, 2013, 11:04:30 »
Any pointers for the script?

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 513
  • Old Skull
    • View Profile
Re: Copy files without directory structure
« Reply #5 on: November 15, 2013, 11:20:48 »
Any pointers for the script?
You have to write it by yourself. Manuals are in the online docs on the main site.