Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2018 09:45 AM
@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")