Announcement

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

  • Set path to a link folder

    Hello everyone,

    I am working on a project which takes several INPUT from several folders disseminated in my hard-drive.
    To avoid to specify every single path from where to take the input, I wanted to put link-folders in one separate folder which would be my unique path.

    For instance, I would set the main path in the MAIN_FOLDER and then inside, I would put linked sub_folders in which data files are located.

    Unfortunately, it seems that STATA doesn't recognize the linked-folders as a directory and thus I cannot open them with the usual code:

    Code:
    use "$path\MAIN_FOLDER\sub_linked_folder\mydta.dta", clear
    STATA doesn't find at all the sub_linked_folder.

    I have dug on the web to find an answer but could not find any. Does anyone know a solution for my issue or any useful workaround? Maybe something like automatically identifying the path of the linked folder and use that as the path or something like that?

    I hope to find an answer here on the forum.

    All the best and thanks in advance


  • #2
    I assume that you work under Windows, right? If so, then you are probably looking for symbolic links in your main folder to your sub linked folder.
    You can explanations about how to use symbolic links for example https://en.wikipedia.org/wiki/NTFS_symbolic_link or https://www.howtogeek.com/howto/1622...dows-or-linux/

    Comment


    • #3
      Great!
      Thanks a lot! It actually solved my issue.

      All the best.

      Comment

      Working...
      X