Announcement

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

  • local directory path (use and save all data in one folder)

    Hi stata users,

    I am using stata 15, I want to set a data path to use and save all data in do files in one folder.
    I tried these codes:
    Code:
    /* set data directoty */
    local dapath "Z:\Table1_charc_regions_120817\cleandata"
    
    /* change work directory */
    cd `dapath'
    
    use "`dapath'\zip_pop.dta", clear
    But stata could not open the data, and instead gave me this error message:
    HTML Code:
    file \zip_pop.dta not found
    Does anyone know how to fix that?

    link in stackoverflow: https://stackoverflow.com/questions/...-in-one-folder

    Thanks!!
    Last edited by Manqing Liu; 11 Dec 2017, 10:41.

  • #2
    Cross-posted and answered at https://stackoverflow.com/questions/...-in-one-folder

    Please note our policy on cross-posting, which is quite explicit. You are asked to tell us about it.

    https://www.statalist.org/forums/help#crossposting

    Comment


    • #3
      Sorry did not notice that.
      The link of the same question in stack overflow is attached here: https://stackoverflow.com/questions/...e-folder-stata

      Thanks!

      Comment


      • #4
        Please read the entire FAQ before posting next. You've now posted 13 times and every time you start a new post Statalist software reminds you to do that.

        Comment

        Working...
        X