Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done stdin as @filelist

I looked for a way to pipe a filename list into a command expecting to operate on a file set. The "@File lists" feature looked like it should do it, but does not, yet. I submit that DOSTUFF @- should treat standard input as a file list unless a file named - is found.
 
My understanding is that con: refers to a device (or pseudo-device) and will not refer to the input stream when that has been redirected. I was trying to use a DSCM command which reports "extra" files, not under version control, to specify a set of files to be deleted. For example, hoping '-' refers to stdin (as is common), I tried:<code>
fossil extra | del @-
</code>. Instead, I can do this:<code>
fossil extra > clip: && del @clip:
</code>. After seeing your reply, I tried:<code>
fossil extra | tail @con:
</code>, but it just waited for me to type which reinforced my belief that con: refers to a specific stream-source rather than the result of input redirection.
 
Hmmm! I may not fully understand, but if you want to delete the files that are listed in FILES_TO_DELETE.TXT,
del @FILES_TO_DELETE.TXT
ought to work.

And if you want to bypass the making of that file, and delete files whose names are going to stdout
DO %file in /P (send file names to stdout) (del %file).
 
Thanks Vince. I had overlooked or forgotten that /P option for DO. So, this works:
do fn in /P (fossil extra) (del %fn)

I submit that my suggested enhancement to the filelist feature is still meritorious.
 
Back
Top
[FOX] Ultimate Translator
Translate