Skip to content

Instantly share code, notes, and snippets.

@JamoCA
Last active August 30, 2019 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamoCA/727120f97b33fed5528a to your computer and use it in GitHub Desktop.
Save JamoCA/727120f97b33fed5528a to your computer and use it in GitHub Desktop.
Sample Windows command line to upload file to Amazon S3
REM 20151223
REM More info at http://www.s3express.com/help/help.html
REM 27mb ZIP Upload to S3 Comparison
REM Adobe ColdFusion 10: 110 seconds
REM AmazonS3 CLI: 40 seconds
REM S3Express: 16 seconds
"c:\S3Express.exe" "loadauth NAME" "put c:\file.zip s3dir/s3subdir/ -t:10 -rr -minoutput -optimize -mul:5 -nomulmd5 -nomd5existcheck -nobucketlisting -move -tofile:c:\filelog.txt" -exit
REM 20190830
REM More info at http://www.s3express.com/help/help.html
REM This will one-way-copy+delete files/directories from a local path to a remote S3 server based on MD5 hash.
REM I excluded "_gsdata_" because the sub-directory is only synced via FTP using GoodSync (which doesn't work well w/S3 IMHO)
REM In order to work with BAT file, a separate TXT file and the "exec" command will need to be used due to brackets in the commandline.
put c:\project1\_scripts\ project1/_scripts/ -s -onlydiff -t:3 -purge -purgeabort:NEVER -exclude:_gsdata_ -tofile:c:\project1\logs\s3express_<*date*><*hour*><*minute*><*second*>.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment