Delete file on xbox with python?
#1
...how can i delete a file on my xbox with a python script?
Reply
#2
this is in the python documents, please read them.

http://www.python.org/
http://wiki.xbmc.org/?title=Python_Development
Reply
#3
blittan Wrote:this is in the python documents, please read them.

http://www.python.org/
http://wiki.xbmc.org/?title=Python_Development


i alredy searched...but

os.remove("E:/XBMC/shutdown/shutdown.a")

doesnt seem to work =/
Reply
#4
When you you try to delete the file, nothing in xbmc.log?

http://docs.python.org/library/os.html
Reply
#5
I thought xbox used \ as the path separator?
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#6
You should never use '/' or '\' in your script, use instead of os.sep
The best way to to that ould be to use os.join() function:

Code:
file2delete= os.path.join("special://xbmc", "shutdown", "shutdown.a")
Image
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

Image
Reply
#7
Must've left my brain at home...

@Masternoob
Listen to Temhil's advice and read this:

http://xbmc.org/jmarshall/2009/02/10/cha...d-plugins/
Reply
#8
Temhil: really nice point there, common sense to use it Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Delete file on xbox with python?0