Want: Copy To List

Features wanted...
Post Reply
Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Want: Copy To List

Post by Papoulka » 09 Feb 2017 00:37

I have two files selected, and on the clipboard a list of 500 paths gathered via "To Clipboard | Item Paths". I want a direct way to copy these two file to each of those paths.

My first thought is an option in "Edit | Copy To..." to paste the paths into the destination list. But there may be a better way, or an existing method that I have missed. I know it can be scripted but think it may well be appropriate as a native XY feature.

admin
Site Admin
Posts: 48978
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Want: Copy To List

Post by admin » 09 Feb 2017 15:46

I have this on my list for a while now, but I never came around to implement it. Partly because it feels a bit like bloat. Give me a convincing reason and I'll add it...
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Want: Copy To List

Post by Jerry » 09 Feb 2017 18:12

I very often copy the same single file to each of several subfolders, with the latter capable of being specified with a wildcard expression. So the copyto() function does not accept a wildcard [location] or even a way to pickup selected target locations from the list? When I have a lot of these subfolders, I end up going into a unix shell on my PC to do it.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

admin
Site Admin
Posts: 48978
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Want: Copy To List

Post by admin » 09 Feb 2017 18:27

But why?
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Want: Copy To List

Post by Jerry » 09 Feb 2017 18:46

admin wrote:But why?
The most common use case is an album or boxed set parent folder containing many CD subfolders into which I want to copy an image file of the album cover so I can see it when playing the individual CDs. Another situation involves copying the same status marker or info file of some sort into a number folders, not necessarily subfolders under the same parent. My pathnames are often already near the max length allowed for Windows, so appending tokens to the folder names is usually not an option. For just status marking, I could use XY's tags, I suppose, but not for informational files.

UPDATE: Actually, I just discovered that with the music player I use, Foobar2000, I can have it look it for album coverart optionally, one or more directory levels up. But that may not be the case with other players.
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

Papoulka
Posts: 455
Joined: 13 Jul 2013 23:41

Re: Want: Copy To List

Post by Papoulka » 10 Feb 2017 03:48

The most common use case is an album or boxed set parent folder containing many CD subfolders into which I want to copy an image file of the album cover
This is very close to my own case. In general, this need will arise occasionally when maintaining large collections.

So there is a predictable use for it. The questions are (a) whether that appears often enough in the XY community; (b) does this function fit in the model of a comprehensive file manager; and (c) how hard is it to work around.

I think the latter two argue for inclusion. It would not be out of place at all in XY, and there is no easy alternative that I know of - I'll have to script my present task. But how often it's needed is of course unclear except from requests.

Jerry
Posts: 708
Joined: 05 May 2010 15:48
Location: DysTrumpia

Re: Want: Copy To List

Post by Jerry » 10 Feb 2017 04:29

Well, others here will have to weigh in if they care, but I think it's probably something that should just be scripted in a foreach loop instead of encumbering the API. The only reason I sometimes resort to doing this kind of thing outside of XY in a unix shell (using cygwin on the PC) is simply because I'm just too familiar with it, it's relatively simple since the shell environment takes care of a lot of things for you, and because shamefully, I'm not too eager these days to master yet another language. I mean, it doesn't get much easier than this:

Code: Select all

for f in CD*; do cp cover.jpg $f; done
or in your case, to copy 2 files to each path in a list of various paths:

Code: Select all

for p in $(<filepaths.txt); do cp file1 file2 $p; done
Running on Windows 10 Pro 64-bit quad-core ASUS G752-VY notebook with 64 GB RAM, 20 or more external USB3 drives attached via 4 powered hubs, totaling 50+ TB.

admin
Site Admin
Posts: 48978
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Want: Copy To List

Post by admin » 10 Feb 2017 09:50

Frankly I don't think it's worth the trouble. I agree that it's a case for scripting.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Wear DIY masks! 😷

Post Reply