Heck, Karen, that’s just too simple ...  who'd want to do that?   d:|

Target names are uniquely formed to prevent errors in stream, and, as all
documents are being fed into a legal process, I'm super conservative about
holding on to everything.

In any event, I thought this would be a good opportunity to get in touch
with Plugin file management.

And, I think I know what I'm doing wrong.

Thanks much,

Bruce

From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
Sent: Monday, March 10, 2014 10:15 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: PLUGIN RBFileOperations Error

Of course you know that you cannot rename a file if the "target" name
already exists, right?  I always do a "delete" before a "rename" just in
case.  But I'm wondering why you would bother using a plugin for this?  I
always use RBase's internal rename command and can't say I've ever had an
issue with it.k

Karen


-----Original Message-----
From: Bruce A. Chitiea <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Mon, Mar 10, 2014 11:45 am
Subject: [RBASE-L] - PLUGIN RBFileOperations Error
All:

I'm building a routine to automatically rename a large number of
serially-named files.

The Plugin reports an error: "-ERROR- Wrong OPERATION parameter ".  

The relevant code from inside the loop:
...
SELECT (CTXT(DocumentID)) +
INTO vDocumentID INDIC iv1 +
FROM Document +
WHERE DocSeqNO = .vLoopCounter

SET VAR vDocSeqNO = (CTXT(.vLoopCounter))
SET VAR vBuildSourceString = '(.vSourcePATH + .vDocumentID + .vFileExtLABL
)'
SET VAR vBuildTargetString = '(.vTargetPATH + .vDocSeqNO + ''_'' +
.vDocumentID + .vFileExtLABL )'

SET VAR vSourceString = &vBuildSourceString
SET VAR vTargetString = &vBuildTargetString

PLUGIN RBFileOperations vResult +
|OPERATION RENAME_FILES +
|SOURCE .vSourceString +
|TARGET .vTargetString
...

Watch variable values all "check out":

vSourcePATH = D:\0TEST\0SOURCE\
vTargetPATH = D:\0TEST\0SOURCE\
vFileExtLABL = .pdf

vLoopCounter = 20001
vDocumentID = 20258
vDocSeqNO = 20001

vBuildSourceString = (.vSourcePATH + .vDocumentID + .vFileExtLABL ) 
vBuildTargetString = (.vTargetPATH + .vDocSeqNO + '_' + .vDocumentID +
.vFileExtLABL )

vSourceString  = D:\0TEST\0SOURCE\20258.pdf
vTargetString = D:\0TEST\0SOURCE\20001_20258.pdf

vResult = -ERROR- Wrong OPERATION parameter 


Anything obvious to anyone but me?

Bruce


Reply via email to