Ensure Python is installed by running:
python --versionIf Python is not installed, download and install it from Python Official Website.
Run the following command to upgrade pip:
python -m pip install --upgrade pipRun the following command to install s3cmd:
pip install s3cmdBy default, Windows may recognize s3cmd as a file without an extension instead of a Python script. Navigate to the following path:
C:\Users\<Username>\AppData\Local\Programs\Python\PythonXX\Scripts\
- If
s3cmdis present without a.pyextension, rename it tos3cmd.py. - Add this location to your system environment variables (
Path).
Run:
s3cmd --versionIf s3cmd does not execute correctly, open the s3cmd file and ensure the first two lines are:
#!C:\Python310\python.exe
#coding: utf-8 -
If necessary, run s3cmd using:
python C:\Python310\Scripts\s3cmd.py --versionAlternatively, create a s3cmd.bat file in the same directory as s3cmd.py with the following content:
@echo off
python C:\Python310\Scripts\s3cmd %*
Then, retry running:
s3cmd --versionRun:
s3cmd --configureYou will be prompted to enter the following details:
Access Key: YOUR_ACCESS_KEY
Secret Key: YOUR_SECRET_KEY
Default Region: US
S3 Endpoint: HOST_NAME //Use the Hostname from the Details page.
DNS-style bucket+hostname: HOST_NAME //Use the Hostname from the Details page.
Encryption password: (press Enter to pass)
Path to GPG program: (press Enter to pass)
Use HTTPS protocol: No
HTTP Proxy server name: (press Enter to pass)
Test access with supplied credentials:
Test access with supplied credentials? [Y/n]: Y
If the connection is successful, you will see:
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)
Save settings:
Save settings? [y/N]: y
Your configuration will be saved at:
C:\Users\<Username>\AppData\Roaming\s3cmd.ini
s3cmd lss3cmd mb s3://my-bucket-names3cmd rb s3://my-bucket-names3cmd ls s3://my-bucket-names3cmd put <local_file_path> s3://my-bucket-name/<remote_file_name>Example:
s3cmd put C:\Users\Username\Desktop\files\mv-test.mp4 s3://test-bucket/upload_test.mp4s3cmd put --recursive <local_file_path> s3://my-bucket-nameExample:
s3cmd put --recursive C:\Users\Username\Desktop\files s3://test-buckets3cmd get s3://my-bucket-name/<remote_file_name> <local_file_path>Example:
s3cmd get s3://test-bucket/upload_test.mp4 C:\Users\Username\Desktop\mv_download.mp4s3cmd del s3://my-bucket-name/<remote_file_name>s3cmd put C:\Users\Username\Desktop\video1.mp4 C:\Users\Username\Desktop\video2.mp4 C:\Users\Username\Desktop\video3.mp4 s3://test-bucket/s3cmd sync s3://test-bucket/video1.mp4 s3://test-bucket/video2.mp4 s3://test-bucket/video3.mp4 C:\Users\Username\Desktop\download_temp\or
s3cmd get s3://test-bucket/video1.mp4 s3://test-bucket/video2.mp4 s3://test-bucket/video3.mp4 C:\Users\Username\Desktop\download_temp\s3cmd del s3://test-bucket/video1.mp4 s3://test-bucket/video2.mp4 s3://test-bucket/video3.mp4