I have situation where a batch process (from an audio app) is creating separate folders with an mp3 file in each folder.
Is there any way (Or script) in XY that would let me select 10 folders and somehow move just the contents of those 10 folders to a single target location?
Even better would be to have XY clean up the empty folders afterwards...
Any tips or scripts out there?
Appreciate any help.
Cheers!
VP
Can XYplorer take contents of several folders and move to a single folder?
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Can XYplorer take contents of several folders and move to a single folder?
Code: Select all
setting "BackgroundFileOps", 0;
$selection = <get SelectedItemsPathNames |>;
copyto "R:\destination", quicksearch("/maxdepth=0", $selection, "|"), , 2, 2, 4);
delete 1, 0, $selection;
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Can XYplorer take contents of several folders and move to a single folder?
Awesome.highend wrote:Code: Select all
setting "BackgroundFileOps", 0; $selection = <get SelectedItemsPathNames |>; copyto "R:\destination", quicksearch("/maxdepth=0", $selection, "|"), , 2, 2, 4); delete 1, 0, $selection;
So how do use this to transfer to the target?
While I see "R:\Destination" in here - that will never be the name of the target. And I do not want to have to edit the script each time - or is that the only option?
A tad confused on usage with this one...?
Appreciate any additional info.
Cheers!
VP
Re: Can XYplorer take contents of several folders and move to a single folder?
Hundreds of possibilities...
How do you want to select the target?
How do you want to select the target?
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Can XYplorer take contents of several folders and move to a single folder?
Ideally? I would love it if I could:highend wrote:Hundreds of possibilities...
How do you want to select the target?
1. Highlight a bunch of folders
2. Hit a shortcut key to fire up the script
3. Have an input box appear - so I can create a folder name
4. Click OK
5. Script moves contents of selected folders into new folder I created
Realistically?
I guess I could live with a folde created within the script itself - I could simply choose a generic folder name and create it everytime
I would still need to highlight a series of folders and fire the script via shortcut.
Make sense?
VP
Re: Can XYplorer take contents of several folders and move to a single folder?
Set the $defaultFolderName as you like
Rest should work as desired...
Rest should work as desired...
Code: Select all
$defaultFolderName = "Destination";
setting "BackgroundFileOps", 0;
$destination = input("Create destination folder...", , "<curpath>\$defaultFolderName");
if !($destination) { status "No destination folder given, aborted!", "8B4513", "stop"; end true; }
if !(regexmatches($destination, ":|\\\\")) { $destination = "<curpath>\$destination"; }
$selection = <get SelectedItemsPathNames |>;
copyto $destination, quicksearch("/maxdepth=0", $selection, "|"), , 2, 2, 4);
delete 1, 0, $selection;
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 163
- Joined: 06 Nov 2009 14:01
Re: Can XYplorer take contents of several folders and move to a single folder?
Wow! Thank you so much. It is exactly perfect!highend wrote:Set the $defaultFolderName as you like
Rest should work as desired...
Code: Select all
$defaultFolderName = "Destination"; setting "BackgroundFileOps", 0; $destination = input("Create destination folder...", , "<curpath>\$defaultFolderName"); if !($destination) { status "No destination folder given, aborted!", "8B4513", "stop"; end true; } if !(regexmatches($destination, ":|\\\\")) { $destination = "<curpath>\$destination"; } $selection = <get SelectedItemsPathNames |>; copyto $destination, quicksearch("/maxdepth=0", $selection, "|"), , 2, 2, 4); delete 1, 0, $selection;
VP