USER command questions (Fairlight)

Tyler tyler.style at gmail.com
Fri Sep 11 07:46:21 PDT 2009


> Date: Thu, 10 Sep 2009 21:34:45 -0400
> From: Fairlight <fairlite at fairlite.com>
> Subject: Re: USER command questions
>
> > Can anyone tell me how to use cp or mv with the USER command?  Or is it
> just
> > garbage and I should go back to SYSTEM?
>


> You're assigning the 'move' "alias" (ie., USER handle or whatever the
> proper fP parlance for it is) first, there.  And then you're essentially
> piping in arguments to it, rather than having them all as one command.
>
> In shell terms, what you're doing is essentially the same as:
>
> $ mv <<END
> > -f
> > /some/path
> END
>
> That's why 'mv' is bailing on you.  It's not meant to be used that way.
>
> Forget using USER for 'mv'.  It's nothing you get interactive feedback
> from, so USER is overkill.  Assemble the entire command with arguments and
> feed it to SYSTEM for each file.
>
> Also, be VERY careful with dirlist.  It has a filename length limitation
> that will bite you if the filenames are longer than the memory allocated to
> the function's memory storage.
>
> Back to the original:  Only use USER when you require interactive feedback
> from and/or interactive data supply to a process.  Neither 'mv' nor 'cp'
> fall into that category.
>
>
Thanks Mark!  That was exactly the answer I was looking for!  I will stick
with SYSTEM for mv then, and OPENDIR/NEXTDIR for getting the filenames :)
(thanks to John Esak for the demo on how OPENDIR's usage)

Tyler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20090911/29d4148d/attachment.html 


More information about the Filepro-list mailing list