The Workspace Export Script is a command line utility that exports an entire workspace to your local hard drive. When run, all files and folders in the target workspace are downloaded to a local directory, retaining the workspace folder structure. The latest version of the Workspace Export Script can be downloaded here.
Instructions for running the Workspace Export Script
Requirements
The Workspace Export script requires the following:
-
Node.js: Node.js installed on the system that will be used to run the script (install instructions provided in Setup and Run section below). The Node.js engine allows you to run the Export Script code (JavaScript) outside of a web browser.
-
Secure link: The shareable secure link for the target Workspace that you are planning to export. It should look like the following:
https://demo.sendsafely.com/receive/?packageCode=xxx#keycode=xxx
The secure link can be obtained underneath "Collaborators can use the following link to access this Workspace:" when logged into the workspace.
-
API Key and Secret: A new SendSafely API key and secret generated using a registered SendSafely account that is a collaborator on the target Workspace. You can generate a new API Key and Secret by logging into the SendSafely portal and browsing to the Edit Profile, and then choosing the API Keys option from the left side of the screen. Generate a new API key for use and name it "Workspace Export" or similar. Make sure you record the API Key and API Secret for later use and store it in a secure location as the API secret will not be shown again.
Setup and Run
Here are instructions on how to install Node.js and run the script:
1) Visit https://nodejs.org/en/ and install the most recent LTS version of Node.js
2) Download the latest Workspace Export.zip file to your file system and extract to a folder. The extracted folder is named Workspace Export
3) Open the command line using either the Terminal program on MacOSX or CMD on Windows
MacOSX | Windows |
4) From the command line prompt, use the CD command (Change Directory) to move into the Workspace Export folder by typing the following command (maintaining exact spacing and quotes) and pressing enter:
cd "Workspace Export"
Pro Tip: If you have moved the Workspace Export folder into a location other than your main directory you will need to provide the full folder path, for example if your folder is on your desktop type:
MacOSX:cd desktop/"Workspace Export"
Windows:cd Desktop\"Workspace Export"
Some other useful commands for navigating folders using the command line are included below:
MacOSX |
Windows |
What it does |
ls | dir | Displays a list of current folder’s files and subfolders |
cd .. | cd .. | Moves up a folder |
cd [folder_name] | cd [folder_name] | Moves into folder_name |
cd /desktop/[folder_name] | cd Desktop\[folder_name] | Moves into folder_name on Desktop |
5) Run the following command to install required Node modules:
npm install
6) Run the script with your values substituted for the placeholder values shown in the example below (maintaining exact spacing and quotes).
node ./WorkspaceExport.js --secureLink="YOUR SECURE LINK" --apiKey="YOUR API KEY" --apiSecret="YOUR API SECRET"
Pro Tip : Set up your command in macOSX TextEdit or Windows Notepad first, and then use copy/paste to transfer to the command line. That way if you need to make corrections you can easily do so in the text editor rather than retyping/editing on the command line.
Appendix: Command-Line Options:
-
--secureLink
The shareable secure link for the Workspace that you are planning to export -
--apiKey
Your SendSafely API key obtained the API Keys section of your Profile page when logged into SendSafely -
--apiSecret
Your SendSafely API secret obtained the API Keys section of your Profile page when logged into SendSafely -
--out
Optional parameter the specifies the location of the folder to export the files to on your system. The script will automatically create the folder if it does not exist. Otherwise the script defaults to the following:{workspace name}/{timestamp}
Comments
0 comments
Please sign in to leave a comment.