10/17/2019 - 12:31 PM

Copy files from a list of locations

# FileList contains the list of source file locations to be copied to a new location
# The files are copied to different locations based on their file names (if a filename contains a certain string)
import shutil

for x in FileList:
    if "2FL" in x:
        shutil.copy(x, r"l:\Biotech\Fermentation\Esbjerg\2'FL batch records")
    if "LNnT" in x:
        shutil.copy(x, r"l:\Biotech\Fermentation\Esbjerg\LNnT batch records")