cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Move a folder from Workspace to DBFS

AChang
New Contributor III

So, I didn't quite set up my model training output directory correctly, and it saved all my model files to the workspace in the git repo I was working in. I am trying to move these files to DBFS, but when I try using dbutils.fs.mv, I get this error: 

java.io.FileNotFoundException: /Repos/$EMAIL/$FOLDER/output/checkpoint-13956/*

I have tried it without the *, tried it with and without a foward slash at the end, and I always get the same error. For the destination I am using "dbfs:/$FOLDER". I am trying to avoid downloading each file individually, and when I try to export the whole folder none of the options really work for me since these are not workbook files. Also, some of the files are just too large to download, so I think I will have to use some kind of code option.

1 ACCEPTED SOLUTION

Accepted Solutions

AChang
New Contributor III

Figured it out, just had to use the !cp command, here is what I did, worked perfectly.

!cp -r /Workspace/Repos/$RESTOFPATH /dbfs/folder
 
and it put the entire folder i was trying to move, into that dbfs folder.

View solution in original post

2 REPLIES 2

AChang
New Contributor III

Figured it out, just had to use the !cp command, here is what I did, worked perfectly.

!cp -r /Workspace/Repos/$RESTOFPATH /dbfs/folder
 
and it put the entire folder i was trying to move, into that dbfs folder.

Kaniz
Community Manager
Community Manager

That’s a great tip! Thank you for sharing your knowledge with the community. I’m sure many people will find it helpful. Keep up the good work! 😊

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!