Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Windows, develop a Python 2.x script, cleanup.py, equivalent to the cleanup Bash script from a previous question. Use standard windows commands or python functions.

image text in transcribed

In Windows, develop a Python 2.x script, cleanup.py, equivalent to the cleanup Bash script from a previous question. Use standard windows commands or python functions. Your script must delete all backup and auto-save files from the given directory. Assume that names of back up files end in either (i) or (ii) .bak, and (iii) auto-save files have names beginning with a #. Test cleanup.py: (i) create a new directory named TEST in the current directory, create a few files (say 4 each of names chosen by you) that fit the three categories of junk files in TEST, (ii) Use the Windows Cmd program and the Windows DIR command to show the contents of a TEST directory before running your script, (iii) invoke cleanup.py, and again (iv) Use the DIR command to show the contents of the TEST directory after you ran cleanup.py. For your answer, provide the python version you used and copy paste the results of the Windows DIR command showing the contents of a TEST directory before and after running your cleanup.py script. Copy and paste your "cleanup.py" to the answer field for this

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

Students also viewed these Databases questions