Write a python script to: Check if the folders IT421, IT151, and IT620 exist. If they...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
I need some help and explanation will be a text-based .cpp file including your C++ program and a text-based .sql file including your Oracle stored procedures for the Database Application ....
-
Stems of the first land plants functioned primarily as transport and support structures. Modern stems have these functions also, plus several more. Describe the additional functions.
-
A bag contains 4 white balls and 6 red balls. What is the probability that if 2 balls are drawn (with replacement), (a) The first ball is red and the second is white? (b) Both balls are red? (c) One...
-
For about 10 years after the French Revolution, the French government attempted to base measures of time on multiples of ten: One week consisted of 10 days, one day consisted of 10 hours, one hour...
-
Verify by direct substitution that the functions \(r^{n} \cos (n \theta)\) etc. shown in the text satisfy the Laplace equation in polar coordinates. Calculate the streamfunction for the...
-
As a result of a recent survey of students at the University of South Wisconsin, it was determined that the university owned bookstore currently has 40% of the market. The other three bookstores,...
-
A small plane flies a distance d 1 = 34 km in a direction 1 = 52 o north of east and then flies d 2 = 28 km in a direction 2 = 14 o north of east. 1. What is the magnitude of the net displacement...
-
The members of the Vistas Club are planning a month long hiking and camping trip through the Blue Ridge Mountains, from north Georgia to Virginia. There are a number of trails through the mountains...
-
Question 2 (21 points): Doordog company makes two types of doors, the DA & DB. They are both made of aluminium & Iron, but the D1 is smaller. Information for the two products for 2023 is given: 1....
-
A 250-g piece of an unknown metal has been in boiling water for several minutes. To bring this metal at room temperature \(\left(20^{\circ} \mathrm{C} ight), 89.8 \mathrm{~kJ}\) of heat must be...
-
Aluminum is made by the electrolysis of bauxite. The embodied energy of virgin aluminium is approximately (all embodied energies are approximate) \(210 \mathrm{MJ} / \mathrm{kg}\). What else could...
-
Mizubishi Motors, Inc., which provides auto rental services, entered into the following transactions during the month of June: a. Purchased a total of eight new cars and trucks from Jerry's Motors,...
-
Make the journal entries necessary to record the following eight transactions for Carmen Company. a. Purchased equipment on account for \($260,000\). b. Provided services for \($200,000\) cash. c....
-
Pressure taps in a low-speed wind tunnel reveal the difference between stagnation and static pressure to be 0.5 psi. Calculate the test section air velocity under the assumption that the air density...
-
a) A vector field = 3xyz, + x za, + (x'y 2z)a, is given. For this vector field, i) Find Divergence ii) Check for solenoidality ii) Investigate rotationality b) Fort he path = 2a, + ag + , in the...
-
On August 31, 2012, the balances of the accounts appearing in the ledger of Wood Interiors Company, a furniture wholesaler, are as follows:Prepare the August 31, 2012, closing entries for Wood...
-
The following data give the 2009 estimates of crude oil reserves (in billions of barrels) of Saudi Arabia, Iran, Iraq, Kuwait, Venezuela, the United Arab Emirates, Russia, Libya, Nigeria, Canada, the...
-
Twenty percent of the cars passing through a school zone are exceeding the speed limit by more than 10 mph. a. Using the Poisson formula, find the probability that in a random sample of 100 cars...
-
According to the National Science Foundation, during the Fall 2008 semester (the most recent data available) 30.13% of all science and engineering graduate students enrolled in doctorate granting...
-
Consider the Gompertz model in Eq. (12.35). Graph the expectation function for \(\theta_{1}=1, \theta_{3}=1\), and \(\theta_{2}=\frac{1}{8}, 1,8,64\) over the range \(0 \leq x \leq 10\). Equation...
-
Reconsider the regression models in Problem 12.6, parts a-e. Suppose the error terms in these models were multiplicative, not additive. Rework the problem under this new assumption regarding the...
-
Reconsider the data in the previous problem. The response measurements in the two columns were collected on two different days. Fit a new model \[ y=\theta_{3} x_{2}+\theta_{1} e^{\theta_{2}...
Study smarter with the SolutionInn App