Copy File to Multiple Items in Paper Folder
-
jinsight
- Posts: 2
- Joined: 31 Dec 2015 21:08
Copy File to Multiple Items in Paper Folder
How do I copy a single file into multiple folders that are listed in a paper folder? Thanks.
-
admin
- Site Admin
- Posts: 66657
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Copy File to Multiple Items in Paper Folder
Well, that's not possible in one go. So you do it folder by folder.
FAQ | XY News RSS | XY X
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Copy File to Multiple Items in Paper Folder
Overlooked this...
Here is a small script that allows you to copy the current selected files into each folder of a selectable paperfolder...
Here is a small script that allows you to copy the current selected files into each folder of a selectable paperfolder...
Code: Select all
if !("<selitems>") { status "Nothing to copy, aborted!", "8B4513", "stop"; end 1==1; }
$pf = inputselect("Select a paperfolder to copy to...", folderreport("files:{basename}", "r", "<xypaper>", , , "|"), , 8+64);
foreach($entry, paperfolder($pf, , , "r"), "<crlf>") {
if (exists($entry) == 2) { copyto $entry, "<selitems |>"; }
}
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 66657
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Copy File to Multiple Items in Paper Folder
Of course, for a Jedi scripter nothing is impossible.
FAQ | XY News RSS | XY X
-
highend
- Posts: 14994
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Copy File to Multiple Items in Paper Folder
May the force be with <enter your name>... 
One of my scripts helped you out? Please donate via Paypal
-
jinsight
- Posts: 2
- Joined: 31 Dec 2015 21:08
Re: Copy File to Multiple Items in Paper Folder
2highend
Thank you. I will try it out.
Jim
Thank you. I will try it out.
Jim
-
klownboy
- Posts: 4468
- Joined: 28 Feb 2012 19:27
- Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440
Re: Copy File to Multiple Items in Paper Folder
Hi Highend, I had noticed the other day that this did work if any of your paperfolders were in sub folders under a parent, like "Wallpaper\Jamaica" or "Photos\Aimee". The folderreport will only show paperfolders in the base folder (Paper) and even if you make it recursive it will only show the folder name like "Jamaica" in the inputselect box. To use SC paperfolder in the next line, you need to specify the entire paper folder structure of "Wallpaper\Jamaica" for it to work.
So the way around that was to do the following. Something similar had to be done in Enternal's "PaperList" script http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=12101The inputselect box is showing the ugly system ? mark though I assume because it doesn't know what they are file or folders. Thanks.
So the way around that was to do the following. Something similar had to be done in Enternal's "PaperList" script http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=12101
Code: Select all
$Papers = FormatList(FolderReport("files","r",<xypaper>,"r",,"|"),f,"|","*.txt");
$Papers = Replace($Papers, "<xypaper>\", "");
$Papers = Replace($Papers, ".txt", "");
// $Papers = replace(replace(FormatList(FolderReport("files","r",<xypaper>,"r",,"|"),f,"|","*.txt"),"<xypaper>\", ""), ".txt", ""); //or all nested into one line
if !("<selitems>") { status "Nothing to copy, aborted!", "8B4513", "stop"; end 1==1; }
// $pf = inputselect("Select a paperfolder to copy to...", folderreport("files:{basename}", "r", "<xypaper>","r" , , "|"), , 8+64);
$pf = inputselect("Select a paperfolder to copy to...", $Papers, , 8+64);
foreach($entry, paperfolder($pf, , , "r"), "<crlf>") {
if (exists($entry) == 2) { copyto $entry, "<selitems |>"; }
}
XYplorer Beta Club