N/A

perl tFtpRename - how to use the filemask to rename *.txt in *.bak

I cannot find the syntax to rename all .txt files in .bak
Cannot rename file *.txt: Syntaxe du nom de fichier, de répertoire ou de volume incorrecte.
Someone could help ?
Tags (1)
3 REPLIES
Employee

Re: perl tFtpRename - how to use the filemask to rename *.txt in *.bak

With current components in Perl, you can't do this. The "Filemask" label is a mistake (in the past, tFTP* components were all merged and "get/put" actions are working with a filemask, not a filename).
tFTPFileList is missing, see 4745 for Java. With this component you could:
tFTPFileList ==iterate==> tIterateToFlow --row--> tMap --row--> tReplace --row--> tFTPRename
tMap to duplicate filename into old_filename and new_filename
tReplace to replace 'txt$' into 'bak'.
Can you please add a feature request to have tFTPFileList for Perl? I'll provided it in the ecosystem (very simple component to write)
N/A

Re: perl tFtpRename - how to use the filemask to rename *.txt in *.bak

done:
6123
6124
N/A

Re: perl tFtpRename - how to use the filemask to rename *.txt in *.bak

tFTPFileList ==iterate==> tIterateToFlow --row--> tMap --row--> tReplace --row--> tFTPRename

Could I suggest to add an feature in tFTPGet to get the filename list (of recovered files)
this will allow to save the processed file list in the same time
if we are running tFTFFileList after tFTPGet we could have discrepancies
so alternative is tFTPList -> rename files to *.wip -> getfiles -> remane to *.bak
alternativ will be
tFTP