Is it possible to copy multiple files with a single instance of copy window? (Closed)

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

Is it possible to copy multiple files with a single instance of copy window? (Closed)

Post by John_C »

Here is the example code. There are 3 instances co copy window during the copy.

Code: Select all

foreach($item, "a.txt|b.txt|c.txt", "|", "e") {
    copyas "Copy of " . $item,, $item;
}
Last edited by John_C on 19 Dec 2019 12:22, edited 1 time in total.

highend
Posts: 14954
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to copy multiple files with a single instance of copy window?

Post by highend »

Sure...
copyas "Copy of *.?", ,"a.txt|b.txt|c.txt";
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Is it possible to copy multiple files with a single instance of copy window?

Post by John_C »

Thanks, yes, this way it is possible, I know.

But actually it was an attempt to improve the large script with that you helped me few days ago:

viewtopic.php?p=175135#p175135

I see no way to get rid of foreach loop there.

highend
Posts: 14954
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to copy multiple files with a single instance of copy window?

Post by highend »

Then you're asking the wrong question...

It is not possible if destination items names differ (apart from base + extension) for each item.

Make feature requests for e.g. copyas and or backupto/copyto/moveto so that [pattern] or [location] can be real destination names (separated by "|" or by "<crlf>") like I did for rename: viewtopic.php?f=5&t=18746
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Is it possible to copy multiple files with a single instance of copy window?

Post by John_C »

I'll do it in the next few days. Thanks.

Post Reply