0

whenever i use below, it always combines the "daily no sales" list of PDFs. i can not get the if else statement to work.

daily_files = ["list of files including sales pdf"]

daily_no_sales = ["list of files without sales pdf"]

if "Sales.pdf" in r"T:\filepath":
    for pdf in daily_files:
        merger.append(pdf)
else:
    for pdf in daily_no_sales:
        merger.append(pdf)

FYI i am a beginner so any advice is appreciated. thank you

i am expecting that if the sales pdf is in the file path, then it will be included in the pdf merger, but even when it is in there, it is skipped over.

0 Answers0