I have a group of files in the Workspace of DataBricks that I would like to delete in group. I am using this Python script:
from pyspark.sql import * #not sure if it is necesary to delete the files
dbutils.fs.rm('/Workspace/Users/[email protected]/*.json', True)
The answer I get is False below the Notebook and it doesn't delete any file.
Is there something wrong with my script?
dbutils.fsis for interacting with dbfs, not workspace.You can use python file i/o if you want to interact with workspace.
So in your case it would be: