#help_index "Utils" void DollarFile(LTDirEntry *m1) { BoolU4 changed; I1 *buf,*ptr,ch; while (m1) { if (m1->attr & LT_ATTR_DIR) DollarFile(m1->sub); else { coutln m1->full_name; Sleep(1000); if (buf=ReadTextFile(m1->full_name)) { ptr=buf; changed=FALSE; while (ch=*ptr++) { if (ch=='$$') { ptr--; *ptr++='.'; changed=TRUE; } } if (changed) { WriteTextFile(m1->full_name,buf); coutln "Updated"; } Free(buf); } } m1=m1->next; } } public void Dollar(I1 *src_mask,I1 *flags=NULL) //This is for importing non-"LT" text files. //$BK,1$WARNING:$BK,0$Do not use on files with dollar commands // or on binary files. //r=recurse { LTDirEntry *tempm1=NULL; U8 f=0; GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),"+r"); GetFFlags(&f,SysText("ST_FILE_UTIL_FLAGS"),flags); tempm1=FindFiles(src_mask,f); DollarFile(tempm1); DelLTDirList(tempm1); } #help_index ""