I am trying do a loop where I put graphs in different directories on my computer.
The program will not run the follwing line:
I tried using
at the end, but no luck. If I remove this line the code runs like it is supposed to.
Any suggestions are welcome, thank you
Johan
Code:
foreach name in "Bedtextiel" "Gebak" "Kantoorart" {
cd \\cbsp\productie\Primair\CPI\Werk\50PidMappen\Jvbg\CPI\DatasetHEMA\StataFiles
do DataVoorbereiden`name'.do
do PrijsIndicesSimple.do
cd \\cbsp\productie\Primair\CPI\Werk\50PidMappen\Jvbg\CPI\DatasetHEMA\Grafieken\`name'
format jevon_mtom chained_jevon dutot_mtom chained_dutot guv_mtom chained_guv laspeyres_mtom chained_laspeyres paasche_mtom chained_paasche fisher_mtom chained_fisher chained_tornqvist %3.0f
xtline chained_jevon chained_dutot chained_laspeyres chained_paasche chained_fisher chained_tornqvist chained_guv if product_id == 1, byopts(title("`name'") subtitle("Diverse chained month-to-month prijs indices (EAN)"))
graph export "`name'SimpeleIndicesEAN.pdf", as(pdf) replace
}
Code:
cd \\cbsp\productie\Primair\CPI\Werk\50PidMappen\Jvbg\CPI\DatasetHEMA\Grafieken\`name'
Code:
"`name'"
Any suggestions are welcome, thank you
Johan

Comment