Hello, I am having problems with the following code (for example). As you can see, the cd command does not appear to work within a program, but no problems outside of one.

Code:
. pwd
C:\Users\ijyliu\Documents\repo\National-Wages
 
. di "`Intermediates_dir'"
C:/Users/ijyliu/Documents/repo/National-Wages/Data/Intermediates
 
. program define change_wd_fails
  1. 
. cd `Intermediates_dir'
  2. 
. end
 
. change_wd_fails
C:\Users\ijyliu\Documents\repo\National-Wages

. pwd
C:\Users\ijyliu\Documents\repo\National-Wages

. cd `Intermediates_dir'
C:\Users\ijyliu\Documents\repo\National-Wages\Data\Intermediates
Is there a different command to use within programs or another way to resolve this?

Thanks.