xboxscene.org forums

Pages: [1] 2

Author Topic: Delete Command Not Working Right  (Read 219 times)

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« on: April 01, 2004, 11:28:00 AM »

I'm almost done with my latest and greatest script LIVERemover.xas

The thing is, it'll delete dashupdate.xbe and downloader.xbe just fine. However it refuses to delete the update.xbe files. What gives?

At the end of the script  I added the FileExists variable to a MsgBox to see if MXM was seeing the file. The variable comes up as 1, so it is seeing the file.

This post has been edited by flattspott: Apr 1 2004, 07:31 PM
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Delete Command Not Working Right
« Reply #1 on: April 01, 2004, 01:13:00 PM »

maybe try....
CODE

ATTR update.xbe rw
DELETE update.xbe


i think thats right... its been a while since ive actionscript'ed ohmy.gif
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Delete Command Not Working Right
« Reply #2 on: April 01, 2004, 01:51:00 PM »

tayior7 is probably right... try resetting the read-only attribute.

I'll look into making delete (and a few other commands) a bit more tolerant soon.

(Time to call Japan for work  blink.gif  )
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Delete Command Not Working Right
« Reply #3 on: April 01, 2004, 02:55:00 PM »

BJ- suggestion for mxm- have the copy command have a feature like
CODE
copy D:\default.xbe E:\blah\default.xbe OR

where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite)
its a bit harder to do fileexist, delete, copy biggrin.gif
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #4 on: April 01, 2004, 05:22:00 PM »

I'll  try that. ATTR update.xbe rw, or should I use chmod 777?

Also these were really the xbox live xbe file. Casue I deleted them from all my games a long time ago. What I did was renamed a few zip files as placeholders if you will. But still I give that other stuff a try.

As soon as I solve this I'll post it.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #5 on: April 01, 2004, 04:50:00 PM »

QUOTE (tayior7 @ Apr 2 2004, 12:55 AM)
BJ- suggestion for mxm- have the copy command have a feature like
CODE
copy D:\default.xbe E:\blah\default.xbe OR

where it would just automaticaly overwrite the file E:\blah\default.xbe if it exists(OR = overwrite)
its a bit harder to do fileexist, delete, copy biggrin.gif

That wouldn't work cause OR is already a function. Perhaps OW.

Or better yet,

copy D:\default.xbe E:\blah\default.xbe 0 = Skip
copy D:\default.xbe E:\blah\default.xbe 1 = Overwrite
copy D:\Folder\ E:\blah\ 2 = Skip All
copy D:\Folder E:\blah\ 3 = Overwrite all
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Delete Command Not Working Right
« Reply #6 on: April 01, 2004, 05:27:00 PM »

yea, what he said ^^^
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #7 on: April 01, 2004, 05:41:00 PM »

Still not working

here's a sample

CODE
For i = 0 to 2
  If# %File{i}% == 1 Then
     MsgBox "Live files found$eol$Removing now..." 0 1500
     CD %Path%\%GameName%
     Attr %Live{i}% rw
     Delete %Live{i}%
    ;ChMod 777 %Path%\%GameName%\%Live{i}%
    ;Attr %Path%\%GameName%\%Live{i}% rw
    ;Delete %Path%\%GameName%\%Live{i}%
  EndIf
Next


It's all messed up now only cause I'm trying to get it to work
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #8 on: April 01, 2004, 05:49:00 PM »

I just found that this an MXM error, not mine.

originally I had it this way.

CODE

Set Live0 dashupdate.xbe
Set Live1 downloader.xbe
Set Live2 update.xbe


With this, it wouldn't delete the update.xbe

Then I changed it to

CODE

Set Live0 dashupdate.xbe
Set Live1update.xbe
Set Live2 downloader.xbe


And now it's not deleting downloader.xbe

Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #9 on: April 01, 2004, 06:35:00 PM »

I got it working now,

at the top I have

Set Live0 dashupdate.xbe
Set Live1 update.xbe
Set Live2 downloader.xbe

and later for i = 0 to 2

I changed it to 3, even though there is no 3 and now it works.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Delete Command Not Working Right
« Reply #10 on: April 01, 2004, 06:54:00 PM »

Oh yeah, I've noticed that too.

In c/c++ normally, you have
for(int i = 0; i < 3; i++)

And in BASIC you have the equivalent statement
For i = 0 to 2

So MXM is using the BASIC syntax, but not the way it works
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #11 on: April 01, 2004, 07:17:00 PM »

Interesting indeed...
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Delete Command Not Working Right
« Reply #12 on: April 01, 2004, 07:30:00 PM »

Doh!

Well, I'll fix that.... but it might break a few things.

What do you all suggest?



Remember, I'm always up for well thought out, much considered ideas. After all, you guys have done a LOT more actionscripting than I.  blink.gif
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Delete Command Not Working Right
« Reply #13 on: April 01, 2004, 08:49:00 PM »

Well if it's gonna break a few things, maybe you should leave it.

But I was thing about some IF possibilties. Like,

If %Var% == 1 Set Var2 Value

This way we wouldn't need Then and Elses. Sorta like the If....Goto
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Delete Command Not Working Right
« Reply #14 on: April 01, 2004, 10:11:00 PM »

I would say ELSEIF's are more important.  Even though they can be 'simulated' by using lots of ELSE's, you end up with a ton of ENDIF's at the end

IF x == hello THEN
---
ELSE
IF x == blah THEN
---
ELSE
IF blah == blah THEN
---
ELSE
---
ENDIF
ENDIF
ENDIF
Logged
Pages: [1] 2