{smcl} {* 06Feb2010}{* 1Oct2010}{* 22Dec2020}{...} {hline} help for {hi:fren}{right: version 2.0} {right:{stata ssc install fren, replace: get the newest version}} {hline} {title:Batch File Renamer} {title:Description} {p 4 4 2} {cmd:fren} check the name of files with the extension of {it:file_extension}, searching for {it:st1}. Whenever a matching {it:str1} is found, it is replaced with {it:str2}. {title:Syntax} {p 4 8 2}{cmd:fren} {it:file_extension} {cmd:,} {cmdab:f:rom(}{it:str1}{cmd:)} [ {cmdab:t:o(}{it:str2}{cmd:)} ] {p_end} {synoptset 20 tabbed}{...} {marker options}{...} {synopthdr} {synoptline} {p2coldent :* {cmdab:f:rom(}{it:str1}{cmd:)}}find to be replaced {p_end} {p2coldent :* {cmdab:t:o(}{it:str2}{cmd:)}}use to replace occurrences of {cmd:from()} {p_end} {synoptline} {p2colreset}{...} {title:Technical note} {pstd} This program runs only on Windows System!{p_end} {title:Examples} {pstd}rename all {cmd:txt} files in current directory. as if there're characters {cmd:bad} in file name, it will be changed to {cmd:good} :{p_end} {p 4 8 2}. {stata fren txt, from(bad) to(good)}{p_end} {pstd}rename all {cmd:dta} files in current directory. as if there're {cmd:spaces} in file name, it will be trimed :{p_end} {p 4 8 2}. {stata fren dta, from(" ") to("")}{p_end} {p 4 8 2} {cmd:OR:}{p_end} {p 4 8 2}. {stata fren dta, from(" ")}{p_end} {title:For problems and suggestions} {pstd} {cmd:Author: Liu wei}, Yunnan University of Finance and Economics. {cmd:Address: }Longquan Road 237, Wuhua District, Kunming, Yunnan, P.R.China. {cmd:ZIP Code:} 650221. {cmd:E-mail:} {browse "mailto:liuwei@ynufe.edu.cn":liuwei@ynufe.edu.cn} {break} {title:Also see} {pstd} Other Commands I have written: {p_end} {synoptset 30 }{...} {synopt:{help curvefit} (if installed)} {stata ssc install curvefit} (to install){p_end} {synopt:{help deci} (if installed)} {stata ssc install deci} (to install){p_end} {synopt:{help fdta} (if installed)} {stata ssc install fdta} (to install){p_end} {synopt:{help ftrans} (if installed)} {stata ssc install ftrans} (to install){p_end} {synopt:{help freplace} (if installed)} {stata ssc install freplace} (to install){p_end} {synopt:{help ftree} (if installed)} {stata ssc install ftree} (to install){p_end} {synopt:{help elife} (if installed)} {stata ssc install elife} (to install){p_end} {synopt:{help equation} (if installed)} {stata ssc install equation} (to install){p_end} {p2colreset}{...}