Windows Move or Copy Files and subfolder’s files into 1 path, destination will not have any directories
####################################################

PRO: have all files in one folder, CON: hard to tell certain files apart

How to Copy files from 1 directory tree into 1 path, where the destination path will have just the files without any folders.
The key is to have an engine that can rewrite filenames if filenames already exist. With this type of copy/move the destination folder is bound to have many of the same file. Example: readme.txt will appear alot, so there has to be an engine that can rewrite. So far the only enginer can just add a number every time the same file appears. So if readme.txt apepars 3 times, then you will get readme.txt and readme1.txt and readme2.txt

This tool doesnt exist yet

However my KCOPY tool can do it, i might need to recompile it, when I do I will post it

Other ways,
Using 7zip to copy files from 1 folders tree to 1 path:

1. Zip up the folder with “Store” mode so that its as fast as a copy
2. Extract with 7zip, right click on archive 7zip->Extract files…
3. Select Pathmode: No Pathnames
4. Overwrite method: Auto rename existing files
6. Extract to: Whatever folder you want to extract to
7. Hit Ok

Picky on extensions (only copy certain extensions):

1. Download TreeSize and install it (note you might need pro version for this but im not sure, I have pro version – so I dont know what the free version has)
2. Right click on the folder you want as the source (The one with your files and its subfolders, that you dont wnat)
3. open with TreeSize
4. Select extension tab and then
5. select each extension you want by holding control between clicks (multi select)
6. right click on it on any of the selected/highlighted enteries and select “Show all files of selected extensions”
7. In the main list of files right click, click once with the mouse (left click), then select all with CONTROL-A, then right click on select and click CHECK, all items should be checked
8. Click on Move Checked
9a. Move checked into a folder if you wanted a “move”.
9b. If you want a copy (and keep the files were they are origianlly as well): then select “Move checked files to Zip file” – it wont move the files into zip, it will just make a zip file and leave originals alone, so dont worry about it saying “move to zip”, Then continue from step 2 including step 2 in above section “Using 7zip to copy files from 1 folders tree to 1 path”

Here is C# sharp code that will do the same
#############################################

CITATION: http://stackoverflow.com/questions/17469235/move-all-files-and-subdirectories-from-a-folder-to-another-subdirectory-of-the-s

 

My KCOPY add did this, plus more
#################################

Imagine this file structure

 

If they are all copied to 1 path (which KCOPY and above algorithms can do):

Note: here we have a result of files that all had the same name, so its hard to tell them apart

The other algorithm can grab 1 folder with the file name, to have something like this (again KCOPY can do this):

Note that this one makes more sense except we have part1 and part2 where we dont know what the files belong to.

Linux move files and subfolders files into 1 path, destination will not have any directories
####################################################

Citation: http://stackoverflow.com/questions/19880246/move-only-files-recursively-from-multiple-directories-into-one-directory-with-mv

MISSION: Move only files recursively from multiple directories into one directory with mv

IF you want to move certain extensions like that:

If you don’t want to filter by extension, and just move everything (i.e., all the files):

The -n option so as to not overwrite existing files (optional if you don’t care) and -v option so thatmv shows what it’s doing (very optional).
Extra notes:
* The directory /path/to/master must already exist (it will not be created by this command).
* Make sure the directory /path/to/master is not in /path/to/photos. It would make the thing awkward!

———————–

Citation:
http://askubuntu.com/questions/146634/shell-script-to-move-all-files-from-subfolders-to-parent-folder

MISSION: Shell script to move all files from subfolders to parent folder

Or also:

 

Note the name cutme inside the line. It should be the same as the script you will run.
After creating the file and pasting the above line, run the following in the same folder as the script:
chmod +x cutme. This will give your new file the “Executable” flag so you can execute it like this:./cutme.

Extra Notes:
1. You want to do this recursively (In subfolders and subfolders of those subfolders)
2. You want to skip moving the script file
3. You have permissions to move the files in that folder
4. Files may or may not include spaces in their names

 

Leave a Reply

Your email address will not be published. Required fields are marked *