Hi.
I'd like to copy a folder, but one its subfolder is really big and I don't need to copy its content. Best way to do that is to switch to "flat view", display checkboxes, check my folder and uncheck the subfolder I want to exclude.
Thing is, the folder is pretty big, with a lot of files in its subfolder, etc... and thus the flat view takes a really long time to display them all, and then it's really tedious to scroll to the correct subfolder I need to uncheck.
So, to deal with this issue, I'd like a way to expand/collapse folders in the flat view, or to select them in the tree view.
Second solution would be to be able to temporarily hide folders/files.
Can someone help me with this, please?
How to copy a folder, but excluding some files/subfolders?
-
Pouf
- Posts: 1
- Joined: 05 Oct 2021 09:23
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to copy a folder, but excluding some files/subfolders?
Is this always a different subfolder?
Is this a direct subfolder of the folder you're currently in?
E.g.: D:\Temp is your current folder and you want to exclude D:\Temp\Pictures?
You want to copy everything inside the folder apart from that specific subfolder and all of its contents?
Where do you want to copy it (fixed location, other pane, go into a different folder, ...)?
If this is true:
I'd put them on one user defined button (left click starts the first one, right click the second one)
To be able to execute a right click on a button without getting the context menu for it, you need this tweak:
https://www.xyplorer.com/faq-topic.php?id=tweak
The demo shows how to define a custom button, populate it with a (button) snippet and how to copy the current paths content (with the exception of the subfolder you choose) to a different folder.
In the "Edit User Button" window you right click the "Clear" button to be able to insert the snippet
In the destination tab the new folder "a" is created (because that was the folder name of the source).
The snippet code is:
The two scripts (you must copy them into your "Scripts" folder (Menu - Scripting - Go to Scripts Folder)
Is this a direct subfolder of the folder you're currently in?
E.g.: D:\Temp is your current folder and you want to exclude D:\Temp\Pictures?
You want to copy everything inside the folder apart from that specific subfolder and all of its contents?
Where do you want to copy it (fixed location, other pane, go into a different folder, ...)?
If this is true:
One approach could be: two scriptsIs this a direct subfolder of the folder you're currently in?
E.g.: D:\Temp is your current folder and you want to exclude D:\Temp\Pictures?
I'd put them on one user defined button (left click starts the first one, right click the second one)
To be able to execute a right click on a button without getting the context menu for it, you need this tweak:
CTBNoRClickDefaultCommands=1https://www.xyplorer.com/faq-topic.php?id=tweak
The demo shows how to define a custom button, populate it with a (button) snippet and how to copy the current paths content (with the exception of the subfolder you choose) to a different folder.
In the "Edit User Button" window you right click the "Clear" button to be able to insert the snippet
In the destination tab the new folder "a" is created (because that was the folder name of the source).
The snippet code is:
Code: Select all
Snip: CTB 1
XYplorer 22.30.0005, 05.10.2021 10:32:58
Action
NewUserButton
Name
Copy to / paste from clipboard
Icon
:clipcopy
ScriptL
load "Copy items to clipboard.xys";
ScriptR
load "Paste items from clipboard.xys";
FireClick
0
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
-
highend
- Posts: 15016
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to copy a folder, but excluding some files/subfolders?
This would be an advanced
All deeper subfolders inside those excluded are excluded as well (logical, right?)...
Copy items to clipboard.xys script that allows to exclude any subfolder in the hierarchy...All deeper subfolders inside those excluded are excluded as well (logical, right?)...
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club