Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Windows install instructions

rxsegrxup edited this page Nov 2, 2014 · 8 revisions

This guide explains the setup steps necessary to run the BitcasaFileFetcher on windows. Throughout this guide I am using powershell simply because it is more convenient. It is recommended to run the powershell window as an administrator while installing but it may not be necessary. These instructions should also work in command prompt. I had issues using pip modules in cygwin so I wouldn't recommend using it unless you know what you are doing.

Installing python

  • First you need python. To check if python is already installed simply open powershell and type python --version. This should output Python 2.7.x (the value of x doesn't matter)
  • If this outputs Python 3.x.x then continue bellow to install 2.7 (NOTE: In some cases to find this out check the installed programs listing)
  • If you do not have python installed, install it from their website using the proper MSI installer. This is usually Windows x86 MSI Installer (2.7.x). Use the Windows x86-64 MSI for x64 support.
  • Once installed, open up powershell and type python --version to verify it worked. (Troubleshooting python is beyond the scope of this tutorial)

Installing pip

  • pip is a package manager application. It is the best way to install python modules.
  • To install pip follow this guide. There is a very decent Stack overflow article that explains this method as well as others. If you have trouble with the first method try referencing this answer
  • (NOTE: You will need to run python get-pip.py in powershell)
  • To verify pip was installed simply run pip in powershell.

Installing module dependencies

  • The BitcasaFileFetcher utilizes requests unidecode threading
  • To install it, issue the following command in powershell:
     pip install requests unidecode threading
  • To verify they were installed. Run the following sequence of commands in powershell
  1. python
  2. import requests
  3. quit()
  • If there are no errors, it installed properly

Run getfiles.py

  • After successfully installing python, pip, wget, and requests you can now easily run getfiles.py
  • First, Download the git project
  • Unzip it to a directory of your preference
  • Open powershell and cd to that directory. For example:
     cd C:\Users\<user>\Downloads\BitcasaFileLister-master
  • cd to the python directory. cd python
  • Get the oauth url from getfiles.py using the following command:
     python getfiles.py --oauth
  • Copy and paste the displayed link to your browser.
  • Click Login to authorize access via Bitcasa oAuth
  • After successful login, copy the token displayed and paste it to the following command:
     python getfiles.py --settoken <token you copied>
  • To get the Base64 file paths, go back to your browser, scroll down and click login
  • This login is only used to authorize the hosted file lister access to display your files
  • After successful login your files along with their Base64 paths are displayed
  • You will need the listed access token as well as the base64 path from second column
  • Important test getfiles.py with a single level directory containing a small number of files

Examples:

#Local Destination: be sure to specify the drive letter for absolute paths
#Also, ensure to wrap paths with spaces or other special characters in quotes

python getfiles.py <Base64 Path> <Local Destination>

#For example:
python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\"

This should download the files located at the specified base4 path to the local destination directory.

To download files to a network drive, it is best to use a local temporary directory. To do that, use the following syntax:

python getfiles.py /B-W80yjUQfC6umkOCahHMQ "\\NETWORKDRIVE\bitcasa\saved files\" -t "E:\bitcasa\temp\"

This will download the files to E:\bitcasa\temp first and then to the network location. I personally have found this method to be faster when dealing with network storage.

To display progress of downloads add the -p flag like so:

python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\" -p

To enable extra logging for support or debugging utilize the --verbose flag like so:

python getfiles.py /B-W80yjUQfC6umkOCahHMQ "E:\bitcasa\saved files\" --verbose
Clone this wiki locally