Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
upload whole folder to s3 using cli

Hi i am trying to move all folders from my local machine to S3 bucket, but seem S3 only move files and create folder in S3, leave folder empty in my local machine, so how can move whole folder to S3 or clean my local folder after uploading, command i was using it

aws s3 mv . s3://bucketname/Upload/ --recursive
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Thanks for everyone who comment or answer, i fix issue with creating power shell script delete any empty folder after move files

Set-Location -Path C:\upload-PassThru
Invoke-Expression "aws s3 mv . s3://bucket_name --recursive"
$rootPath = "C:\upload\"
foreach($childItem in (Get-ChildItem $rootPath -Recurse))
{
    # if it's a folder AND does not have child items of its own
    if( ($childItem.PSIsContainer) -and (!(Get-ChildItem -Recurse -Path $childItem.FullName)))
    {
        # Delete it
        Remove-Item $childItem.FullName -Confirm:$false
    }
}
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!