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

