0
$\begingroup$

I have 500 IDs for students in a csv file (I have only one column for IDs) and I need to find the reports (pdf files) for each student among the 2K pdf files. These files are in one folder. Finally, I want to move extracted files into a new folder

So how can I find the pdf file containing the specific ID and move it to a new folder?

I started with this code but got stuck


import fitz
import os
path= r'C:\path\pdf'
id_csv = r"C:\path\pdf\id.csv"
files = os.listdir(path)
with open(id_csv, "r") as i:
    reader = csv.reader(i)
     for file in files:
    doc=fitz.open(path+'\\'+file)

I hope my question is clear

Thanks in advance

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.