Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • local directory not working

    Hello all, I created a local directory and when I call the dataset (straight after defining the local directory) I get this strange message.

    Code:
    . local BIS "C:\Users\Paula\Dropbox\Pesquisa\Projects\WB_Guinea_Bissau\2_Dados\Bases_brutas\BB"
    
    . use ${BIS}/IFTS_GB, clear
    file /IFTS_GB.dta not found
    r(601);
    
    end of do-file
    
    r(601);
    
    .
    But if I call the dataset including the very same directory it works fine.

    Code:
    . use "C:\Users\Paula\Dropbox\Pesquisa\Projects\WB_Guinea_Bissau\2_Dados\Bases_brutas\BB\IFTS_GB", clear
    
    .
    end of do-file
    
    .
    Does anyone know what is the problem with my local directory?

    Many thanks!

  • #2
    The syntax $foo is for including the contents of a global macro foo in your commands.

    This should work for you:

    Code:
    local BIS "C:\Users\Paula\Dropbox\Pesquisa\Projects\WB_Guinea_Bissau\2_Dados\Bases_brutas\BB"  
    
    use `BIS'/IFTS_GB, clear
    See

    Code:
    help macro
    for more.
    Last edited by Nick Cox; 02 May 2019, 02:26.

    Comment

    Working...
    X