xboxscene.org forums

Author Topic: Scripting Special Delete Action  (Read 42 times)

ipodder2003

  • Archived User
  • Sr. Member
  • *
  • Posts: 403
Scripting Special Delete Action
« on: July 20, 2005, 04:11:00 PM »

I'm making a gamesave installer for myself for Ndure, and I have a step in there to delete the C:\fonts\ folder, but that's not always present on xboxes.  Is there a script I can do to delete it only if it's present?  This is what I have right now.

         <Item Action="Delete" Arg1="C:\fonts\"></Item>
Logged

sr_sparky

  • Archived User
  • Full Member
  • *
  • Posts: 195
Scripting Special Delete Action
« Reply #1 on: July 20, 2005, 05:04:00 PM »

This error checking has been requested many times since the newest release, maybe unleashx (the guy) will have seen the demand and made something (or not of course).
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Scripting Special Delete Action
« Reply #2 on: July 20, 2005, 05:40:00 PM »

CODE

If $DVDType$ == "Empty" GOTO NoDisc
 If $DVDType$ != "Empty" GOTO Disc
 
 :Disc
    BeginDraw UseCurrent
     MessageBox "DISC IN DRIVE!!$eol$The MSDash Needs an empty drive $eol$to access its Menus $eol$$eol$Press A Button to Eject and continue$eol$Press B Button to Cancel"
    EndDraw
    Input
     If %_GP_A% == "1" GOTO Eject
     If %_GP_B% == "1" GOTO Cancel
    Quit
  
  :NoDisc
    EXEC c:\xboxdash.xbe
   QUIT
  

  :Eject
    TrayOpen
    EXEC c:\xboxdash.xbe
   QUIT

  :Cancel
   QUIT

Do a bit of esearch and I'm sure you can come up with a script since it has settings like  - FILEEXIST <FileOrPath>
so
CODE
If FILEEXIST "C:\Fonts\xbox.xtf" GOTO DeleteFiles
Logged