FILENAMESEARCHREPLACE-Seachandreplacefilenameswithinadirectoryvlt.file.filenamesearchreplace(DIRNAME,SEARCHSTRS,REPLACESTRS,...)ThisfunctionsearchesallfilesinthedirectoryDIRNAMEformatchesofanystringinthecellarrayofstringsSEARCHSTRS.Ifitfindsamatch,thenitcreatesanewfilewiththesearchstringreplacedbythecorrespondingentryinthecellarrayofstringsREPLACESTRS.Thisfunctionalsocanbemodifiedbyname/valuepairs:Parameter(default)|Description----------------------------------------------------------------deleteOriginals(0)|Shouldoriginalfilebedeleted?
useOutputDir(0)|Shouldwewritetoadifferentoutputdirectory?
OutputDirPath(DIRNAME)|TheparentpathoftheoutputdirectoryOutputDir('subfolder')|ThenameoftheoutputdirectryinOutputDirPath|(willbecreatedifitdoesn'texist)noOp(0)|If1,thiswillnotperformtheoperationbutwill|displayitsintendedactionrecursive(0)|Shouldwecallthisrecursivelyonsubdirectories?
Seealso:vlt.data.namevaluepairExample:Supposemydirnamehasafile'.ext1'.vlt.file.filenamesearchreplace(mydirname,{'.ext1'},{'.ext2'},'deleteOriginals',1)% renames any files with '.ext1' to have '.ext2', deleting old files