Announcement

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

  • Importing encrypted files to Stata (Boxcryptor)

    Hi all,

    I regularly encrypt my datasets using Boxcryptor. Sometimes i'm trying to import something encrypted by somebody else and Stata returns the error "filename.csv not found". This is less than helpful, and I then go down the path of checking my path (pwd, set trace on, etc), and then checking the file exists in the place I tell Stata it is.

    I'm looking for a way for Stata to identify why a file cannot be found, and specifically if it is because of the encryption. I'm thinking of something like

    Code:
    capture import delimited ....
          if _rc!=0{
                      di in red "This file is encrypted and you do not have access"
        }
    The above code would be incorrect in any situation where I have simply named the file incorrectly or the path is wrong, etc. Does anyone here have knowledge of Boxcryptor / encryption more generally, and whether Stata's use, import delimited, and import excel commands capture information specific to file encryption?


    Last edited by Chris Larkin; 28 Jun 2017, 08:11.

  • #2
    Have you tried using the interactive procedure to open the file? Sometimes simple works.

    Comment


    • #3
      Yes, this is what I usually do when first setting up my do-files. I've got hundreds of scripts i dip in and out of on my machine though, and permissions for encryption change over time. I was hoping to put something together so Stata could tell me if it not having access to a file was the reason it wasn't being imported

      Thanks for your comment!

      Comment

      Working...
      X