Copy Files From Specific Folders
Moderators: white, Hacker, petermad, Stefan2
Copy Files From Specific Folders
Hello, I would like to copy only the files that folders with a specific name contains. Moreover, I want to keep the folder structure.
I manage to do it, partially, through the search bar, but I can not keep the folder structure this way.
Any suggestions?
Many thanks for considering my request.
I manage to do it, partially, through the search bar, but I can not keep the folder structure this way.
Any suggestions?
Many thanks for considering my request.
Re: Copy Files From Specific Folders
You might be able to keep the directory structure by using one of the pseudo packer plugins TreeCopyPlus or CopyTree. Instead of simply copying the files, you need to "pack" them. The plugin readme's should contain information on how to use them.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Copy Files From Specific Folders
2GeorgeAl
Try to save that search and the in the copy dialog (F5) use the saved search in the "Only files of this type" field.I manage to do it, partially, through the search bar
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Copy Files From Specific Folders
So you want to copy all folders that contain a specific file, let's say backup.me? (your description wasn't very clear)
Yo wnat these folders copied to (let's say) X:\Backup and want to preserve the folder structure?
I would use Everything for that (assuming you have it installed):
Yo wnat these folders copied to (let's say) X:\Backup and want to preserve the folder structure?
I would use Everything for that (assuming you have it installed):
- In Everything, search for:
Code: Select all
"c:\start folder" child:backup.me
- Select all folders
- Menu:Edit > Advanced > Advanced Copy to Folder
- Old format: C:\start folder\%1
New format: X:\Backup\%1 - Check the preview if all is OK
- Press OK button.
- Done
Re: Copy Files From Specific Folders
I think GeorgeAl wants files from folders with specific names.NotNull wrote:So you want to copy all folders that contain a specific file
But I agree it is not very clear what GeorgeAl means (it seems that there are words missing in the first sentence - disturbing the meaning).GeorgeAl wrote:I would like to copy only the files that folders with a specific name contains
Maybe GeorgeAl could give an example with specific names of files and folders that he wants to be copied.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Copy Files From Specific Folders
This is one of those "Do you see a young woman or an old witch in this picture" kind of descriptions
With a lot of effort, I now see the other 'picture' too.
If it is as you described, search in Everything for folder: "c:\start folder" "specific name" instead.
Rest of the steps are the same.
But you are right, there might even be a third 'picture'. Only GeorgeAl can tell ...
Re: Copy Files From Specific Folders
Here are three scenarios:
1. If I want to copy all files from any subdir named "mydir" including full folder structure down to the mydir folder(s), I can use this in the copy dialogs "Only files of this type" field:
the |**\ is to exclude dirs that does not contain a mydir in the path
2. If I want to copy all .txt files including full folder structure, I can use this in the copy dialogs "Only files of this type" field:
the |**\ is to exclude dirs that does not contain .txt files.
3. If I want to copy all .txt files from any subdir named "mydir" including full folder structure down to the mydir folder(s), I can use this in the copy dialogs "Only files of this type" field:
Note files from folders below "mydir" will NOT be copied.
1. If I want to copy all files from any subdir named "mydir" including full folder structure down to the mydir folder(s), I can use this in the copy dialogs "Only files of this type" field:
Code: Select all
mydir\* |**\
2. If I want to copy all .txt files including full folder structure, I can use this in the copy dialogs "Only files of this type" field:
Code: Select all
*.txt |**\
3. If I want to copy all .txt files from any subdir named "mydir" including full folder structure down to the mydir folder(s), I can use this in the copy dialogs "Only files of this type" field:
Code: Select all
mydir\*.txt |**\
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Copy Files From Specific Folders
A fourth scenario:
If I want to copy files from several specific subdirs, I just list all of them:
If I want to copy files from several specific subdirs, I just list all of them:
Code: Select all
mydir\* myotherdir\* yetanotherdir\* |**\
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Copy Files From Specific Folders
Thank you all for the answers.
I meant that only want to copy the files that folders with a specific name have.
e.g., I have three tv-series with a structure of season (...), season 2 (...), etc., and a folder with extras; I want only to copy the folder extras, but I also want to keep the folder structure of the tv series.
I hope to make myself clear. It is hard trying to describe something so unusual.
I manage to do it with copy whiz, but I would like to do it with total commander because it is better.
I meant that only want to copy the files that folders with a specific name have.
e.g., I have three tv-series with a structure of season (...), season 2 (...), etc., and a folder with extras; I want only to copy the folder extras, but I also want to keep the folder structure of the tv series.
I hope to make myself clear. It is hard trying to describe something so unusual.
I manage to do it with copy whiz, but I would like to do it with total commander because it is better.
Re: Copy Files From Specific Folders
2GeorgeAl
Then try this: Mark the main folders for the 3 TV series, press F5 to copy, and put
in the field: "Only files of this type"
Then try this: Mark the main folders for the 3 TV series, press F5 to copy, and put
Code: Select all
extras\* |**\
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Copy Files From Specific Folders
Thank you. That works great.petermad wrote: ↑2020-09-22, 02:12 UTC 2GeorgeAl
Then try this: Mark the main folders for the 3 TV series, press F5 to copy, and putin the field: "Only files of this type"Code: Select all
extras\* |**\
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: Copy Files From Specific Folders
Just an addendum:
If the folder(s) in question (here "extras") have non-empty sub folders that should be copied as well, specify this in the "Only files of this type" field:
(extras\* will only copies files directly located within the "extras" folder(s), but not any files in any sub folders of "extras")
The ** part of a file mask pattern is unfortunately somewhat poorly documented, and you will have to search the history.txt file to find some explanation for it:
If the folder(s) in question (here "extras") have non-empty sub folders that should be copied as well, specify this in the "Only files of this type" field:
Code: Select all
extras\**\* |**\
The ** part of a file mask pattern is unfortunately somewhat poorly documented, and you will have to search the history.txt file to find some explanation for it:
history.txt wrote:29.01.17 Added: New wildcards for relative dirs now support wildcard **, which stands for any number of subdirs, e.g. subdir\**\*.txt finds text files where the relative path contains "subdir" anywhere in the path (32/64)
-
- New Member
- Posts: 1
- Joined: 2022-11-05, 20:13 UTC
Re: Copy Files From Specific Folders
What if I want to copy only the subdirs and their files BUT without folder structure? (I dont want the parent folders, only the mydir folders (and their contents)?petermad wrote: ↑2020-09-20, 21:21 UTC Here are three scenarios:
1. If I want to copy all files from any subdir named "mydir" including full folder structure down to the mydir folder(s), I can use this in the copy dialogs "Only files of this type" field:the |**\ is to exclude dirs that does not contain a mydir in the pathCode: Select all
mydir\* |**\
I managed to do it thru Alt+F7 search, but I wonder what is the code in this case?
Thanks!