/PDFs-AI-rename

Got a folder of PDFs? This Python script quickly renames them, like a smart assistant that reads and suggests concise new names for each file.

Primary LanguagePython

PDFs-AI-rename

Imagine you have a folder full of PDF documents, and you're looking for a quick and creative way to rename them. This Python script is designed to help you do just that! It's like having a personal assistant who reads through your PDFs and suggests new, concise names for each file.

Here's how it works:

  1. Read PDFs: The script scans a specified folder on your computer, looking for PDF files. It then reads the text from each PDF, pulling out the information that will inspire the new file names.

  2. Generate Names: With the content of your PDFs in hand, the script sends a message to a smart AI service (think of it like a really intelligent wordsmith). This AI takes the content, thinks about it, and comes up with a short, catchy name for each file – no more than 15 characters long.

  3. Rename Files: Once the AI has suggested new names, the script goes back to your folder and renames each PDF accordingly. Now, instead of generic names like "document1.pdf" or "report.pdf," you have meaningful, concise titles that reflect the content of each file.

This script is perfect for anyone who wants to organize their digital files more efficiently or add a touch of creativity to their file naming process. It's a simple tool that can save you time and make your file management a little more enjoyable.

Remember, to use this script, you'll need to have Python installed on your computer, along with the necessary libraries (PyPDF2 and requests). You'll also need an API key from OpenAI, which you can obtain by signing up for their services. The script assumes you're comfortable with renaming files on your computer and that you're looking for a fun, easy way to refresh your file organization.