Determine the GCD with recursion instead of looping.

Challenge your while loops in your code the same way you challenge
vars. In fact, while loops and vars often go hand in hand. Because
while loops don't result in a value, to make any kind of
difference to your program, a while loop will usually either need
to update vars or perform I/O. So, be a bit suspicious of while
loops in your code.
Use a for expression to print files in the current directory.

The "file <- filesHere" syntax is also called a generator, and it
iterates over filesHere, which is of type Array[File]. In each
iteration, a new val named file is initialized with an element
value. The compiler infers the type of file to be File because
filesHere is an Array[File]. For each iteration, the body of the
expression, println(file), will be executed. Because File's
toString method yields the name of the file or directory,
the names of all the files and directories in the current
directory will be printed.
Use for expressions to iterate over Range types.

"1 to 4" generates a range from 1 to 4, inclusive of 4.
"1 until 4" generates a range from 1 to 4, excluding 4.

Iterating through integers like this is common in Scala, but not
nearly as much as in other languages. In other languages,
you might use this facility to iterate through an array,
like this:

// Not common in Scala...
for (i <- 0 to filesHere.length - 1)
  println(filesHere(i))

This for expression introduces a variable i, sets it in turn to
each integer between 0 and filesHere.length - 1, and executes
the body of the for expression for each setting of i. For each
setting of i, the i’th element of filesHere is extracted
and processed.  The reason this kind of iteration is less common
in Scala is that you can just as well iterate over the collection
directly. If you do, your code becomes shorter and you sidestep
many of the off-by-one errors that can arise when iterating
through arrays. Should you start at 0 or 1? Should you add -1, +1,
or nothing to the final index? Such questions are easily answered,
but easily answered wrongly.

It is safer to avoid such questions entirely.