ricardo_portill
Databricks Employee
Databricks Employee

@bkr, you can reference the file name using dbutils and then pass this to the move command. Here's an example for this in Scala:

val fileNm = dbutils.fs.ls("/usr/krishna/sample").map(_.name).filter(r => r.startsWith("test"))(0)
val fileLoc = "dbfs:/usr/krishna/sample/sample/" + fileNm
dbutils.fs.mv(fileLoc, "dbfs:/user/abc/Test/Test.csv")