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
Nancy would like to configure an automatic response for all emails received while she is out of the office tomorrow, during busi
marishachu [46]

Answer:

I believe the answer is the second one

5 0
4 years ago
Read 2 more answers
How can users create a shortcut to favorite websites and store them in their browser?
8090 [49]
I know the first one is A) Bookmark sites and I think the second one is B) Cross-platform capability. 
8 0
3 years ago
Read 2 more answers
The Turing test consists of a person asking written questions of a person and a computer. If the questioner can't tell which one
Juliette [100K]

Answer:

intelligence

Explanation:

According to my research on information technology, I can say that based on the information provided within the question if this happens then we can say that the computer has attained intelligence. This is because this is a test developed by Alan Turing in 1950, in order to observe a machine's ability to exhibit intelligent behavior equal to, or indistinguishable from, that of a human.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Can someone help me with this
Alex787 [66]
I’m not sure but I think it belongings.
5 0
3 years ago
The piece of hardware that contains the circuitry that processes the information coming into the computer and tells the other ha
Aleksandr-060686 [28]
The central processing unit
6 0
3 years ago
Other questions:
  • Design an algorithm for finding all the factors of a positive integer. For example, in the case of the integer 12, your algorith
    8·1 answer
  • How does kinetic energy affect the stopping distance of a small vehicle compared to a large vehicle?
    14·2 answers
  • What are some effective methods for scrolling? Check all that apply.
    6·1 answer
  • What is a short sequence of characters that appears at the end of a filename and is preceded by a period called __________
    5·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • You want to use a terminal program to terminal into a cisco router. what protocol should i use
    8·1 answer
  • The force required to slide an object is equal to _____.
    13·1 answer
  • Is Missouri a free state or a slave state​
    13·2 answers
  • A data table is a range that displays what?
    15·2 answers
  • Hyperlink is a term used to refer to the specific manner of specifying the address of a website. Write reason for true or false.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!