Page 1 of 1
Is it possible to copy multiple files with a single instance of copy window? (Closed)
Posted: 19 Dec 2019 10:45
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;
}
Re: Is it possible to copy multiple files with a single instance of copy window?
Posted: 19 Dec 2019 11:11
by highend
Sure...
copyas "Copy of *.?", ,"a.txt|b.txt|c.txt";
Re: Is it possible to copy multiple files with a single instance of copy window?
Posted: 19 Dec 2019 11:39
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.
Re: Is it possible to copy multiple files with a single instance of copy window?
Posted: 19 Dec 2019 11:52
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
Re: Is it possible to copy multiple files with a single instance of copy window?
Posted: 19 Dec 2019 12:22
by John_C
I'll do it in the next few days. Thanks.