help box

Title

box -- Command to find and set the Box local folder as Stata's working directory

Syntax

box
[, nocd]

Description

box locates a user's Box directory and sets Stata's working directory to that location. The command is useful for running do-files saved in Box across different computers (e.g., office or home) or shared between colleagues without the need to manually amend the working directory in the do-file. box works only if a single Box account is installed and no other folders containing the word 'box' are in the same directory.

Option

nocd does not change the directory to Box but save the results in r(db).

Stored results

The Box directory is stored in r(db) and can be viewed with return list.

Acknowledgment

This program is based on a modification of the command dropbox. All credits to their authors, Raymond Hicks and Dustin Tingley. dropbox was featured in Stata Journal, volume 14, number 3: pr0058.

Author

Giacomo Zanello

University of Reading

Reading, UK

If you use the command, please consider citing this software as follows:

Giacomo Zanello, 2025. "Box: Command to find and set the Box local folder as Stata's working directory" Statistical Software Components, Boston College Department of Economics.

Last updated

23 January 2025