Hello Raghul Kannan,
<update>
PG confirmed this is expected behavior. Since the mv API treats mv test.csv to another file folder2
.
You can either use the "destination file path" or make sure folder2 already exists or use mv API like below.
mssparkutils.fs.mv("abfss://******@storageaccount.dfs.core.net/folder1/test.csv","abfss://******@storageaccount.dfs.core.net/
folder2/test.csv
",True)
PG is going to update the documentation: ‘destination directory’, to "destination file path" on the below command.
mssparkutils.fs.mv('source file or directory', 'destination directory', True) # Set the last parameter as True to firstly create the parent directory if it does not exist
I hope this answers your question.
Please let me know if you have any further questions.