<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Use python to extract the last modified date for TIFF file in S3 bucket in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/use-python-to-extract-the-last-modified-date-for/m-p/1349226#M69230</link>
    <description>&lt;P&gt;Hello community, does anyone know how to use python to get the last modified date for raster dataset? In my case, I have some TIFF files in S3 bucket, which is a cloud storage store. I want to scan folders and identify the newly added TIFF dataset. Instead of using the specific package for aws bucket, is it possible to use arcpy or arcgis api for python to get the modified date from the property headers?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-14 110522.png" style="width: 627px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85935i3D4FD1EDFBB628A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-11-14 110522.png" alt="Screenshot 2023-11-14 110522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Han&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 16:07:04 GMT</pubDate>
    <dc:creator>haoechibubao</dc:creator>
    <dc:date>2023-11-14T16:07:04Z</dc:date>
    <item>
      <title>Use python to extract the last modified date for TIFF file in S3 bucket</title>
      <link>https://community.esri.com/t5/python-questions/use-python-to-extract-the-last-modified-date-for/m-p/1349226#M69230</link>
      <description>&lt;P&gt;Hello community, does anyone know how to use python to get the last modified date for raster dataset? In my case, I have some TIFF files in S3 bucket, which is a cloud storage store. I want to scan folders and identify the newly added TIFF dataset. Instead of using the specific package for aws bucket, is it possible to use arcpy or arcgis api for python to get the modified date from the property headers?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-11-14 110522.png" style="width: 627px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/85935i3D4FD1EDFBB628A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-11-14 110522.png" alt="Screenshot 2023-11-14 110522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Han&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 16:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-python-to-extract-the-last-modified-date-for/m-p/1349226#M69230</guid>
      <dc:creator>haoechibubao</dc:creator>
      <dc:date>2023-11-14T16:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use python to extract the last modified date for TIFF file in S3 bucket</title>
      <link>https://community.esri.com/t5/python-questions/use-python-to-extract-the-last-modified-date-for/m-p/1349262#M69232</link>
      <description>&lt;P&gt;I would lean towards using the boto3 package to get that info. I would assume it's the same as you would get through the metadata, hopefully. There are a couple of ways to do this, but they all pretty much entail getting a "last_modified" attribute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import boto3
s3 = boto3.client('s3', region_name='your_region')
objects = s3.list_objects(Bucket='your_bucket')

for o in objects["Contents"]:
    print(o["LastModified"])&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Nov 2023 17:33:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-python-to-extract-the-last-modified-date-for/m-p/1349262#M69232</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-11-14T17:33:15Z</dc:date>
    </item>
  </channel>
</rss>

