Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

mssparkutils.fs.mv is giving : java.io.IOException: when trying to move files

Hi All,   I am trying to move files from one a workspace in one subscription to another workspace in another subscription using mssparkutils.fs.mv. mssparkutils.fs.cp is working file. I am able to ...
  • AndyDDC's avatar
    2 years ago

    Hi Anonymous have you tried adding the parameters that create the destinations directory?

     

    mssparkutils.fs.mv(file.path,updated_path,True,True)
     
     
    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

    mssparkutils.fs.mv('source file or directory', 'destination directory', True, True) # Set the third parameter to True to firstly create the parent directory if it does not exist. Set the last parameter to True to overwrite the updates.