Skip to main content
1 of 2
Joe
  • 33
  • 1
  • 4

Delete file in blender python script

does anyone know how to delete a file from inside blender script? i tried to use os.remove, but it gives me an error: TypeError: unlink: illegal type for path parameter

the path i put into the os.remove is the same path i use to load the file, where i save it into a variable. i tried changing the string variable to subtype = "FILE_PATH" but no effect. the loading goes fine, but if i input the same path to remove it doesn't work

is there any other way to do this?

Joe
  • 33
  • 1
  • 4