Raoul wrote:
> I received around 100 different do-files from a colleague, but the
path name in each do-file is different from my computer because the
do-files were on a different computer. Is there any easy way to change
the path in each do-file without having to physically open each
do-file and replace the path name?
I once had the same task to do and used windows search and an editor
(Notepad++) to solve it.
1. Search for "*.do"-files in the given directory (including
subdirectories).
2. Mark results (exlude unwanted results manually if needed)
3. Open files in editor (context menu -> "open with") (Notepad++ had no
problem with >100 files)
4. Search and replace string in all open files
5. Save all files (with one click in Notepad ++)
This only takes a few minutes.
It's a manual approach but compared to some automatic script gives
better insight in the process to spot possible errors.
Best wishes
Stefan Gawrich
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/