Welcome to the new Box Support website. Check out all the details here on what’s changed.

API call to delete files?

New post

Comments

3 comments

  • Kourtney

    Hello , 

     

    Great question! The CLI would definitely be a great tool to use here. 

     

    Here's the command you would run: 

     

    box files:delete FILEIDHERE
    

     

    This does support using a bulk CSV and if you wanted to do that you'd create a .csv file with one column named ID. This would contain each file ID you wanted to delete. The command to run that would become: 

     

    box files:delete --bulk-file-path=BULKFILEPATHHERE

     

    Best, 

    0
    Comment actions Permalink
  • avctor

    You rock. Thank you for the quick reply. I'll look into and respond with my results. 

     

    0
    Comment actions Permalink
  • avctor

    Is there a way to introduce a wildcard? Deleting by file ID will work however we have several users that can changed the name and I believe that changes the file ID. 

     

    Would a script be a better choice for this rather than CLI?

    0
    Comment actions Permalink

Please sign in to leave a comment.