Question: Write a python script to: Check if the folders IT421, IT151, and IT620 exist. If they do not, create them in your folder. Use
Write a python script to: Check if the folders IT421, IT151, and IT620 exist. If they do not, create them in your folder. Use libraries: os, ex: os.mkdir() Then move the files that begin with ITx to the folder ITX where x is the class number. If the file already exists, rename it like the following example: IT421 1456991403.txt becomes IT421 1456991403 (1).txt And, IT421_1456991403 (1).txt becomes IT421 145699140 (2).txt Note that if you do not have duplicates, copy a few into another folder and test your code. Task3: Write a python script to: For each folder, create a folder called old if it does not exist. Move all files older than 25 days into that folder. Apply the same renaming scheme as done in task 2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
