HQ NETWORK:   XBOX ONE |  XBOX 360 |  AIDELUXE HQ Network: 7,557 | Guests: 1248 | Members: 0 


   Current Location: Forums New Game - Fursan al-Aqsa - Knights of al-Aqsa Mosque   |   Old Xbox boot but wont load games or MS Dashboard   |   New google drive   |   Which modchip is this?   |   Anyone here capable or interested in restarting XBConnect?   |   Error code 05   |   original xbox with 0 memory   |   Why cell damage is low with ratings   |   Xbox-Hq.Com VIP Member Testimonials   |   XBHD: A Full-Featured Original Xbox Adapter from EON Gaming,   |   
  Home | Active Topics | CD/DVD Media | Downloads | Forums | Feedback | Games | HardDrives | Homebrew | My Profile | ModChips | Reviews | Search | SoftMods | Tutorials

Xbox Forums

Discuss all aspects of the original Xbox Console in our Interactive Xbox Forums..

Get Xbox Game Pass Ultimate
Xbox-Hq.Com :: View topic - Deleting Cache, X, Y, Z script question.
Xbox-Hq.Com Forum Index -> UnleashX Discussions
Post new topic Reply to topic  Goto page 1, 2  Next  
 Deleting Cache, X, Y, Z script question. View previous topic :: View next topic  
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 10:43 am   
Post subject: Deleting Cache, X, Y, Z script question.
Reply with quote
 
Hi everyone. Does anyone have any guidance on how I could write a script that could be called from the menu that will delete both cache files and clear out the contents of drive X, Y & Z?

I find that on occasion I need to do so to regain sanity and it would be great if I could do it in a more automated way... yeah yeah I know it only takes a few seconds but think of all the time I could regain in a lifetime using a script! (oh... yeah I suppose it will all be wasted in writing this question and reading the responses and writing the script - none-the-less!). :)

boing!


View user's profile Send private message
 
 
 
 
funkydopeloven
Xbox-Hq Genius


Joined: Nov 30, 2004
Posts: 1942

Post Posted: Fri Jul 29, 2005 11:19 am   
Post subject:
Reply with quote
 
pop AID in drive, format cache drives


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 3:54 pm   
Post subject:
Reply with quote
 
Yeah... I know... Can I move that script to my HD so I don't have to pop anything anywhere? Wink

boing!


View user's profile Send private message
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 4:11 pm   
Post subject:
Reply with quote
 
yea if you put it in config.xml in unleashx
_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 4:16 pm   
Post subject:
Reply with quote
 
ahhh... so if I look at the config.xml on the cd will all the answers become clear! :)

boing!


View user's profile Send private message
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 4:40 pm   
Post subject:
Reply with quote
 
Before I blow things up: :)

does this look right:

<List Text="Clear cache and XYZ" Sort="Off" Batch="True">
<Item Action="AskUser" Arg1="notice">This option will delete all the files from E:\CACHE as well as the contents of X, Y and Z drives. Are you sure you want to do this?</Item>
<Item Action="Delete" Arg1="E:\CACHE\*"></Item>
<Item Action="Delete" Arg1="X:\"></Item>
<Item Action="Delete" Arg1="Y:\"></Item>
<Item Action="Delete" Arg1="Z:\"></Item>
</List>

I'm a little concerned about the E:\CACHE\* part... does that look right?

Thanks for the help!

boing!


EDIT: Yeah - this doesn't quite work... It doesn't like something to do with Delete... it choked on the * but without it it deletes the CACHE directory (which isn't right either). :) still working on it.. I'll update when I get it working.


View user's profile Send private message
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 6:08 pm   
Post subject:
Reply with quote
 
ok a couple of things...

1) Format cache drives doesn't actually clear the cache. It just just formats X Y Z. E:/CACHE is not touched.

2) The little code above does fine (well without the *) to get rid of the contents of XYZ and E:/CACHE. Unfortunately it also removes E:/CACHE.

Any thoughts on how to delete the contents of E:/CACHE without removing the actual directory (in other words leaving the directory empty).

* and *.* don't help... I've tried.

boing!


View user's profile Send private message
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 6:47 pm   
Post subject:
Reply with quote
 
<List Text="Clean Cache" Sort="Off" Batch="True">
<item action="messagebox" arg1="Clean Cache">This will clear your cache. This can help if many games don't start or hang.</item>
<Item Action="delete" Arg1="e:\cache"></Item>
<Item Action="Format" Arg1="X" ></Item>
<Item Action="Format" Arg1="Y" ></Item>
<Item Action="Format" Arg1="Z" ></Item>
<item action="messagebox" arg1="Done">Cache is cleaned.</item>
</List>

_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 7:06 pm   
Post subject:
Reply with quote
 
Pirrup - that does that same thing I had mentioned earlier - it removes the cache directory. I just want to empty the cache directory? Is the difference clear enough?

I've found that I can delete the two files individually like this:

<List Text="Clear cache and XYZ" Sort="Off" Batch="True">
<Item Action="AskUser" Arg1="notice">This option will delete all the files from E:\CACHE as well as the contents of X, Y and Z drives. Are you sure you want to do this?</Item>
<Item Action="Delete" Arg1="E:\CACHE\LocalCache00.bin"></Item>
<Item Action="Delete" Arg1="E:\CACHE\LocalCache08.bin"></Item>
<Item Action="Delete" Arg1="X:\"></Item>
<Item Action="Delete" Arg1="Y:\"></Item>
<Item Action="Delete" Arg1="Z:\"></Item>
</List>

but if they aren't there is errors as well (which is not elegant but then again if they aren't there why am I trying to delete them?) . I could put the delete x y and z first so that they all get cleared out and then it will either error or not depending on if there is something to delete in cache. However it would be best to just delete the contents of cache or remove cache and then mkdir it back but I can't make that work either. ;)

Are there and docs on unleashx? I can't find any reference to this stuff anywhere. :)

boing!


View user's profile Send private message
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 7:15 pm   
Post subject:
Reply with quote
 
use my script m8

thats the one that is correct

it will create CACHE again.

i use this script also

_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 7:16 pm   
Post subject:
Reply with quote
 
never do delete x y z !!!!

only use delete for E:\CACHE

_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 7:21 pm   
Post subject:
Reply with quote
 
Ok your script does the same thing mine does and does not recreate the cache directory.

I'm not sure of the difference between format and delete in this context but they both appear to do the same thing.

On to the question of the moment. How do I write a script that either just clears the contents of e:\cache but leaves e:\cache in place OR how do I mkdir it back once it is gone from the action delete that we are both using.


boing!


View user's profile Send private message
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 7:49 pm   
Post subject:
Reply with quote
 
i'm gonna say this one more time and this is the last time,

when my script deletes it its gone

but when a game puts files in cache it will create the CACHE dir

look up what delete is and format is on a pc , xbox = pc

format is used for drives not for directory or files ( X Y Z are drives not dirs)
delete is used for removing files and directories

_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


View user's profile Send private message Visit poster's website MSN Messenger
 
 
 
 
boing
Xbox-HQ Enthusiast
Xbox-HQ Enthusiast



Joined: Jun 12, 2005
Posts: 46

Post Posted: Fri Jul 29, 2005 8:02 pm   
Post subject:
Reply with quote
 
ok - but this is the 'first' time you said a game would put it back.

last time you said:

"use my script m8
thats the one that is correct
it will create CACHE again."

I guess by 'it' you meant a game.

As to the format vs. delete issue they both accomplish the same result - X Y and Z end up empty. Format will definitely clear things out but delete will do the same thing (except that it's might perhaps miss hidden or system files I suppose).

Anyway - I should probably drop the issue but since it's been academic for the last few messages anyway I'll ask my question again very clearly since I'm just trying to learn something and have a 'perfect script' that won't create errors (like yours and mine) - try running your script two times in a row and you'll see what I mean.

QUESTION: How do I delete the contents of a directory without deleting the directory itself - OR - how do a create an empty directory. Either of those should get me to the 'perfect script nirvana (tm)' I'm trying to find.

Smile

boing!


View user's profile Send private message
 
 
 
 
pirrup
V.I.P. Lifetime



Joined: Feb 01, 2005
Posts: 1345
Location: belgium

Post Posted: Fri Jul 29, 2005 8:05 pm   
Post subject:
Reply with quote
 
MY SCRIPT DOESN'T GIVE ERRORS!!!

why would you do a clear cache 2 times after eachoter????


about your question:

you can't man i would tell you how if it was possible

if you didn't know i'm a softmod admin here

_________________

HOTSWAP | MS dash |
Flashing Hitachi(xbox360)


Last edited by pirrup on Fri Jul 29, 2005 8:08 pm; edited 1 time in total


View user's profile Send private message Visit poster's website MSN Messenger
 
Display posts from previous:   
  Post new topic  
 
  Reply to topic  
Goto page 1, 2  Next |
 All times are GMT | Page 1 of 2
Jump to:  
 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
 


Get Xbox Game Pass Ultimate