Announcement

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

  • #16
    Hello,

    I would want to make something similar :

    Code:
    . local ad1 "E:\test1"
    
    . local ad2 "\test2"
    
    . export "`ad1'`ad2'" "myfile.csv", replace
    but this is the Stata answer :
    export: unknown subcommand "E:\test1\test2"
    I can't find the syntax problem ?

    Comment


    • #17
      See reference in #8.

      Best
      Daniel

      Comment


      • #18
        Well... I tried all combinaisons with / and \, without results.
        I even tried

        Code:
         
         local ad1 "E:\test1"   
         export "`ad1'" "myfile.csv", replace
        or
        Code:
         
         local ad1 "E:/test1"   
         export "`ad1'" "myfile.csv", replace

        Comment


        • #19
          I have found the problem, it comes from the backslash... and the quotes

          good :
          Code:
          local ad1 "E:/test1"
          export delimited using  "`ad1' /myfile.csv", replace
          not good (in #11) :
          Code:
          export delimited using  "`ad1'" "/myfile.csv", replace
          Best

          Comment

          Working...
          X