Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9052313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:08:15+00:00 2026-06-16T13:08:15+00:00

I have to reorganize S3 objects — basically move them around from one prefix

  • 0

I have to reorganize S3 objects — basically move them around from one prefix to another.

I do this by copying the original object from the source path to a target path.

I would like to retain the original time stamps that are on the original object.

I am using the Java sdk to perform this task.

I am attempting to do this by:

        // Create a meta object to apply to the new object
        ObjectMetadata newObjectMetadata = new ObjectMetadata();

        // Next I set the lat mod date on the new meta object from the old object summary
        newObjectMetadata.setLastModified(Original_objectSummary.getLastModified());

        // Next I create a CopyObjectRequest
        CopyObjectRequest cor = new CopyObjectRequest(bucket, objectSummary.getKey(), bucket, targetKey);

        // Next I set the new object meta data on the copy request 
        cor.setNewObjectMetadata(newObjectMetadata);

However when the object is created it has the last modified date as seen in the AWS management console set to the date the new object was created.

Any help or clarification appreciated.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:08:17+00:00Added an answer on June 16, 2026 at 1:08 pm

    When I needed to do this, I ended up having to save the original last_modified timestamp as a separate x-amz-meta- property, for the reason you specify. That was using other languages (Perl and Python), so I don’t think it’s a Java SDK issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have deployed numerous report parts which reference the same view however one of them
have written this little class, which generates a UUID every time an object of
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
i have a huge database, around 1 TB in size, most of the space
Please help me out with this. I have this small application to load txt
I have been partially successful at removing almost all the popUp menus from the
I have a bunch of Python modules I want to clean up, reorganize and
Not sure how to troubleshoot this problem. I have an IntelliJ Ultimate Edition, used
I have a List of IWord objects named taggedInput . I need to associate
Say i have a DataTable object with data from the database, and I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.