Skip to main content
Question

Getting list of files uploaded today - python

  • May 22, 2025
  • 2 replies
  • 16 views

Forum|alt.badge.img

I uploaded 381 files today to box.  How can I get a list of all of those files uploaded?

 

items = client.search().query(query='TEST QUERY', limit=9000, ancestor_folder_ids=["123456789"], updated_at_range=["2021-09-08T07:00:01Z", "2021-09-09T19:35:01Z"],file_extensions=['pdf'])


for item in items:
count += 1
print('ID {0}_{1} name is {2} #_{3} #_{4} #_{5} #_{6} #_{7} #_{8}'.format(item.id, count, item.name, item.created_at, item.modified_at, item.trashed_at, item.purged_at, item.content_created_at,item.content_modified_at))

 

The above only prints out 2 files.

What is the code to show the "updated_" time that the file was uploaded?

TIA

 

2 replies

Forum|alt.badge.img

Hi Steve, 

Is the client you are using collaborated into the files/folder you are searching for? If not, you might try making an as-user call. Here is also the documentation for Box python search capabilities. 

Thanks, 

Alex, Box Developer Advocate


Forum|alt.badge.img

I tried working with that search example.

Whatever value I gave "ancestor_folders", the search would look through ALL of my folders.

 

It would be nice to have a FULL example for the new people to use as a starter.

I'm a newbie on box.