Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Statistics

Authors: Prem S. Mann

8th Edition

9781118473986, 470904100, 1118473981, 978-0470904107

More Books

Students also viewed these Programming questions

Question

3. Speak respectfully. Use the students name.

Answered: 1 week ago