Page 1 of 1
Copy File to Multiple Items in Paper Folder
Posted: 31 Dec 2015 21:20
by jinsight
How do I copy a single file into multiple folders that are listed in a paper folder? Thanks.
Re: Copy File to Multiple Items in Paper Folder
Posted: 03 Feb 2016 08:45
by admin
Well, that's not possible in one go. So you do it folder by folder.
Re: Copy File to Multiple Items in Paper Folder
Posted: 03 Feb 2016 09:50
by highend
Overlooked this...
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 |>"; }
}
Re: Copy File to Multiple Items in Paper Folder
Posted: 03 Feb 2016 10:13
by admin
Of course, for a Jedi scripter nothing is impossible.
Re: Copy File to Multiple Items in Paper Folder
Posted: 03 Feb 2016 10:15
by highend
May the force be with <enter your name>...

Re: Copy File to Multiple Items in Paper Folder
Posted: 09 Feb 2016 21:39
by jinsight
2highend
Thank you. I will try it out.
Jim
Re: Copy File to Multiple Items in Paper Folder
Posted: 10 Feb 2016 14:59
by klownboy
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=12101Code: 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 |>"; }
}
The inputselect box is showing the ugly system ? mark though I assume because it doesn't know what they are file or folders. Thanks.