Created
April 26, 2018 15:06
-
-
Save rajasimon/5f2b6a1795b024539c7ae1bcdc099a79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copy file Operation | |
""" | |
import os | |
import shutil | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--name', required=True) | |
parser.add_argument('--file1', required=True) | |
parser.add_argument('--file2', required=True) | |
# Parse argument | |
args = parser.parse_args() | |
# Create folder | |
try: | |
os.mkdir(args.name) | |
except: | |
pass | |
# File copy operation | |
shutil.copy(args.file1, args.name) | |
shutil.copy(args.file2, args.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy File Operation
Usuage