Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72797

Foreach inside cd " "

$
0
0
Does foreach not work inside cd " "?

I tried the command below:
Code:
local uf AC AM RO RR PA AP TO MA PI CE RN PB PE AL SE BA ES MG RJ SP PR SC RS MS MT GO DF

foreach x of local uf {
cd "C:\Users\Paula\Pesquisa\DADOS\dados_georreferenciados\CEPs_Censo_2010\`x'"
}
And Stata answered:
Code:
unable to change to C:\Users\Paula\Pesquisa\DADOS\dados_georreferenciados\CEPs_Censo_2010`x'
r(170);
Once I try to do it manually, it works perfectly
Code:
. cd "C:\Users\Paula\Pesquisa\DADOS\dados_georreferenciados\CEPs_Censo_2010\AC"
C:\Users\Paula\Pesquisa\DADOS\dados_georreferenciados\CEPs_Censo_2010\AC

Viewing all articles
Browse latest Browse all 72797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>