At some unfortunate time, I named my partitioned drive with the letter "B". I am setting up a new computer and IT requires me to use C: (without the partition). I will have move all of the B drive data into a new folder on C. So now all my .do files will be pointing to an obsolete path when trying to call data/ado etc. E.g., a file previously stored as "B:\project_a\data\dataset1" might now be "C:\db\project_a\data\dataset1".
Although some of my .do files start with a global directory declaration at the top of the file, which could be changed, many do not. Therefore many .do files have files used for appending, merging, and other .do files preceded with the path to be used preceding the command.
E.g.,
Code:
cd "B:\project_a\data"
use dataset1, clear
or
Code:
cd "B:\project_a\data"
merge 1:1 id using dataset2
Respectively these would need to be changed to:
Code:
cd "C:\db\project_a\data"
use dataset1, clear
and
Code:
cd "C:\db\project_a\data"
merge 1:1 id using dataset2
Is there any hope of resolving this problem in some find and replace bulk method?
Thanks, in advance,
Ben
0 Response to Redirecting All Ado Paths to New Drive & Folder
Post a Comment