nerdexam
CompTIACompTIA

SK0-005 · Question #491

SK0-005 Question #491: Real Exam Question with Answer & Explanation

The correct answer is B: Loop. A loop is a script construct that allows the script to repeat a block of code until a certain condition is met or for a specified number of times. A loop can be used to apply a test to each file in a directory and move the files that meet the criteria.

Server administration

Question

A server administrator is creating a script that will move files only if they were created before a date input by the user. Which of the following constructs will allow the script to apply this test until all available files are assessed?

Options

  • AVariable
  • BLoop
  • CComparator
  • DConditional

Explanation

A loop is a script construct that allows the script to repeat a block of code until a certain condition is met or for a specified number of times. A loop can be used to apply a test to each file in a directory and move the files that meet the criteria.

Topics

#Scripting#Loops#Automation#File management

Community Discussion

No community discussion yet for this question.

Full SK0-005 PracticeBrowse All SK0-005 Questions