Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os
- import csv
- import subprocess
- source_dir = "\\\\192.168.1.200\\Microfilm\\CID01489 - Standard School District\\JID01055 - Microfiche Scanning (under MSA)\\SFTP\\Delivery"
- out_dir = "\\\\192.168.1.200\\Microfilm\\CID01489 - Standard School District\\JID01055 - Microfiche Scanning (under MSA)\\Combined"
- dirs = [dir for dir in os.listdir(source_dir) if os.path.isdir(os.path.join(source_dir, dir))]
- for dir in dirs:
- if dir != "Sample" and dir != "Out":
- print("Generating %s.pdf..." % dir)
- sys.stdout.flush()
- full_path = os.path.join(source_dir, dir)
- subprocess.call("magick \"%s/*.jpg\" \"%s/%s.pdf\"" % (full_path, out_dir, dir))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement