1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Masja [62]
3 years ago
9

Create a Python script that takes two parameters to do the following:-

Computers and Technology
1 answer:
tekilochka [14]3 years ago
6 0

Answer:

import sys, time

from os import walk, remove

from os.path import exists, join, getsize, getctime

file_counter = [ ]

folder_name, file_size = argv

isExist = exists( folder_name )

if folder_name == True:

    for root, folder, files in walk( folder_name ):

          for file in files:

               if getsize( join ( root, file ) ) >= file_size:

                   file_log = [ ]

                   file_log.append( file )

                   file_log.append( join ( root, file) )

                   file_log.append( time.ctime( getctime( file ) ) )

                   file_counter.append( file_log )

               else:

                   remove ( join ( root, file ) )

Explanation:

The python script above output the filename, size and file creation date of any folder passed to it.

You might be interested in
Which of the following statements is true regarding Wireshark?
melisa1 [442]

I would go with A. Wireshark is probably the most widely used packet capture and analysis software in the world.

Wireshark is a pretty handy tool that is used to capture and analyze network traffic. It is used by techies and sys admins to troubleshoot network protocols and services that are normally exposed over networks. It is the best way to see whether protocols like DNS and DHCP are doing the “right” thing. It simply helps you understand network traffic analysis and how communication takes place.

5 0
3 years ago
10. Question<br> What are the drawbacks of purchasing something online? Check all that apply.
max2010maxim [7]

Explanation:

1) the quality of purchased good may be low

2) there might me fraud and cheaters

3) it might be risky

4) we may not get our orders on time

7 0
3 years ago
Which is an internet service? <br> A.) antivirus <br> B.) chat <br> C.) firewall<br> D.) router
mojhsa [17]

Router, that is what the internet company gives you so you can have internet in your home and all the others don't make sense.

4 0
4 years ago
Read 2 more answers
Is the ability to use digital tools for reading communicating and learning online?​
topjm [15]

Answer:

Digital Literacy is the correct answer to the given question .

Explanation:

Digital literacy is the ability of the person to that is giving reading communication, written communication and online learning by finding, analyzing the need for information of the person.

  • The main objective of Digital literacy is to giving transparent information on various digital platforms .
  • The digital literacy trained the children to increase the quality of the school work .
  • The children, students who are trained by digital literacy has conserved the time and the effort.  
4 0
3 years ago
Write a program of while loop 1234 get printed 4231
katovenus [111]

Answer:

5221054 i think....

Explanation:

3 0
3 years ago
Other questions:
  • A(n) _____ is a computer network that uses Internet Protocol technology to share information, operational systems, or computing
    12·1 answer
  • Sabiendo que el engranaje motriz tiene 14 dientes y gira a 4000 RPM, y el conducido tiene 56 dientes, responde:
    11·1 answer
  • Presses the Schedulr app icon Selects the list item for CSCI 448 Presses the "View Classroom on Map" button While only performin
    11·1 answer
  • Create a Trip class. Include as data members destination, distance traveled, total cost of gasoline, and number of gallons consu
    14·1 answer
  • Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has
    9·1 answer
  • Can somebody help I need it now please and thank you correct answer please
    10·2 answers
  • A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, cell A3 contains 7. You enter in cell A4 the fo
    7·2 answers
  • Consider a computer that uses 5 bits to represent positive integers and uses all 5 bits to represent the value.
    9·1 answer
  • Contrast between functions of sort and sorted in python . ​
    10·1 answer
  • Older systems that often contain data of poor quality are called ________ systems.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!