Hello,
I have a script that a forum member wrote for me (thanks to him) that allows me to copy selected files into defined directories:
$dstFolders = <<<>>>
X:\folder_1
X:\folder_3
P:\folder_2
>>>;
setting "BackgroundFileOps", 0;
$items = get("SelectedItemsPathNames", "|");
if !($items) { status "No items selected, aborted...", "", "stop"; end 1==1; }
foreach($folder, $dstFolders, "<crlf>") {
if !(exists($folder)) { new($folder, "dir"); }
copyto $folder, $items;
I would like to improve this script to be able to choose the directories to copy the files to. I'm a complete beginner and don't know how to do it. Can anyone help me ?
Thank you so much
Script to copy files to different directories
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Script to copy files to different directories
From the folders inbe able to choose the directories to copy the files to
$dstFolders?If yes, add that line (with same indention) after the
>>>; one:
Code: Select all
$dstFolders = inputselect("Select folder(s)", $dstFolders, <crlf>, 1+2+32+16384, , 600, 500);
One of my scripts helped you out? Please donate via Paypal
-
zzjean
- Posts: 115
- Joined: 22 Nov 2009 14:56
Re: Script to copy files to different directories
Thanks for your help. Yes, that's what I want.
But, sorry, it doesn't work
If I do :
I have this
With this :
I have :
It’s a little better !
So, could you help me a little more
Thank you
But, sorry, it doesn't work
If I do :
I have this
With this :
I have :
It’s a little better !
So, could you help me a little more
Thank you
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
-
zzjean
- Posts: 115
- Joined: 22 Nov 2009 14:56
Re: Script to copy files to different directories
sorry, i forgot the attachements
To see the attached files, you need to log into the forum.
-
RalphM
- Posts: 2089
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: Script to copy files to different directories
Read & follow the instructions. 
Ralph 
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 25H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
zzjean
- Posts: 115
- Joined: 22 Nov 2009 14:56
Re: Script to copy files to different directories
I don't know how I did it, but it finally works.
My life is going to be better now
Thank you all for your help and patience
My life is going to be better now
Thank you all for your help and patience
XYplorer Beta Club