Output AWS CLI "sync" results to a txt file
<p>I'm new to AWS and specifically to the AWS CLI tool, but so far I seem to be going OK.</p>

<p>I'm using the following commands to connect to AWS S3 and synchronise a local directory to my S3 bucket:</p>

<pre><code>set AWS_ACCESS_KEY_ID=AKIAIMYACCESSKEY
set AWS_SECRET_ACCESS_KEY=NLnfMySecretAccessCode
set AWS_DEFAULT_REGION=ap-southeast-2
aws s3 sync C:\somefolder\Data\Dist\ s3://my.bucket/somefolder/Dist/ --delete
</code></pre>

<p>This is uploading files OK and displaying the progress and result for each file.
Once the initial upload is done, I'm assuming that all new syncs will just upload new and modified files and folders.  Using the <code>--delete</code> will remove anything in the bucket that no longer exists on the local server.</p>

<p>I'd like to be able to output the results of each upload (or download in the case of other servers which will be getting a copy of what is being uploaded) to a .txt file on the local computer so that I can use blat.exe to email the contents to someone who will be monitoring the sync.</p>

<p>All of this will be put into a batch file that will be scheduled to run nightly.</p>

<p>Can the output to .txt be done?  If so, how?</p>