xboxscene.org forums

Author Topic: Pxhddloader Script  (Read 840 times)

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« on: April 19, 2004, 03:27:00 AM »

Hi guys, I'am using the pxhddloader script that converts the folder names to the actual game names and have come up with a slight hitch.
It renamed most of my games but not all, is there a text limit in the file that will only rename so many characters?
It couldnt rename Dues Ex Invisible Wars or Need For Speed Underground among a few.
I'am using the V2 file so maybe theres a newer one out there somewhere?
Thanks for any help given smile.gif
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #1 on: April 19, 2004, 03:46:00 AM »

I just sussed out what the problem is, all the game folders not renamed have a : in thier title, is there a way around this?
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Pxhddloader Script
« Reply #2 on: April 19, 2004, 08:43:00 AM »

Can I see a copy of the script (or bunch of lines) causing this?
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Pxhddloader Script
« Reply #3 on: April 19, 2004, 01:18:00 PM »

Try this instead

<Action>
;PxHDDLoader Renamer MXM Action Script
;Written by DBZRacer
;Purpose: This MXM action script searches for folders created by PxHDDLoader in your E and F drive and
;prompts you if you want to rename the undescriptive PXGame0000 folder name to the more descriptive XBE Title.

:Start
BeginDraw UseCurrent
 MessageBox "  - PxHDDLoader Folder Renamer - $eol$Press X to Rename folders in Drive E$eol$Press Y to Rename folders in Drive F$eol$Press B to Cancel"
EndDraw
Input
If %_GP_Y% == "1" GOTO FDriveSelected
If %_GP_X% == "1" GOTO EDriveSelected
If %_GP_B% == "1" GOTO Cancel
Quit

:FDriveSelected
SETFUNC FolderEmpty PATHEMPTY F:\hddloader
IF %FolderEmpty% == "1" GOTO FolderNotFound
SET HDDLoaderPath "F:\\hddloader"
GOTO DefineSearch

:EDriveSelected
SETFUNC FolderEmpty PATHEMPTY E:\hddloader
IF %FolderEmpty% == "1" GOTO FolderNotFound
SET HDDLoaderPath "E:\\hddloader"
GOTO DefineSearch

:FolderNotFound
BeginDraw UseCurrent
 MessageBox "PxHDDLoader Root Folder Not Found on Drive"
EndDraw
Delay 2
QUIT

:DefineSearch
BEGINSEARCH %HDDLoaderPath%\pxgame*
GOTO SearchTop

:SearchTop
IF %search_type% == "dir" GOTO DIRFound
IF %search_type% == "file" GOTO NextSearch
GOTO DoneSearch

:DIRFound
SETFUNC GameTitle XBETITLE %HDDLoaderPath%\%search_name%\default.xbe

SETFUNC Temp FatXify %GameTitle%
Set GoodTitle %Temp%

BeginDraw UseCurrent
 MessageBox "%GameTitle% found in %search_name% folder$eol$Press Y to RENAME %search_name% to %GameTitle%$eol$Press A to Skip to next folder$eol$Press B to Cancel Script"
EndDraw

Input
If %_GP_Y% == "1" GOTO RenameFolder
If %_GP_A% == "1" GOTO NextSearch
If %_GP_B% == "1" GOTO Cancel
Quit

:RenameFolder
RENAME  %HDDLoaderPath%\%search_name% %HDDLoaderPath%\%GoodTitle%
BeginDraw UseCurrent
 MessageBox "%search_name% has been renamed to %GameTitle%$eol$Press A to find next match$eol$Press B to Cancel Script"
EndDraw

Input
If %_GP_A% == "1" GOTO NextSearch
If %_GP_B% == "1" GOTO Cancel
Quit

:NextSearch
SearchNext
GOTO SearchTop

:Cancel
BeginDraw UseCurrent
 MessageBox "PHDDLoader Folder Renamer Action Script Cancelled"
EndDraw
DELAY 5
QUIT

:DoneSearch
EndSearch
BeginDraw UseCurrent
 MessageBox "PxHDDLoader Folder Renamer$eol$              Completed $eol$ Please REBOOT XBOX NOW $eol$    for changes to take effect"
EndDraw
DELAY 10
ResetMenuCache
QUIT
</Action>

This post has been edited by flattspott: Apr 19 2004, 08:19 PM
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #4 on: April 19, 2004, 11:10:00 PM »

Thanks Flattspott, I'll give it a go...this is what I'am currently using:


;#############################
;#                            
;# CREATOR: DBZRacer
;# DATE: 10.13.03
;# Action Script Name: PxHDDLoader Folder Renamer
;# VERSION: 2.0
;# Menu Item Action Script                      
;# Function Description: This MXM action script searches
;# for all folders created by PxHDDLoader in your E and F drive
;# and prompts you if you want to rename the undescriptive
;# PXGame0000 folder name to the more descriptive XBE Game Title.
;#                                                                      
;#############################


:Start
BeginDraw UseCurrent
  MessageBox "  - PxHDDLoader Folder Renamer v2- "
EndDraw
DELAY 1
SET RenamerCounter 0
GOTO EDriveSearch

:EDriveSearch
SETFUNC FolderEmpty PATHEMPTY E:\hddloader
IF %FolderEmpty% == "1" GOTO FDriveSearch
SET HDDLoaderPath "E:\\hddloader"
GOTO DefineSearch

:FDriveSearch
SETFUNC FolderEmpty PATHEMPTY F:\hddloader
IF %FolderEmpty% == "1" GOTO FolderNotFound
SET HDDLoaderPath "F:\\hddloader"
GOTO DefineSearch

:FolderNotFound
BeginDraw UseCurrent
  MessageBox "PxHDDLoader Root Folder Not Found$eol$Action Script Cancelled"
EndDraw
Delay 2
QUIT

:DefineSearch
BEGINSEARCH %HDDLoaderPath%\pxgame*
GOTO SearchTop

:SearchTop
IF %search_type% == "dir" GOTO DIRFound
IF %search_type% == "file" GOTO NextSearch
GOTO DoneSearch

:DIRFound
SETFUNC GameTitle XBETITLE %HDDLoaderPath%\%search_name%\default.xbe
BeginDraw UseCurrent
  MessageBox "%GameTitle% found in %search_name% folder$eol$Press Y to RENAME %search_name% to %GameTitle%$eol$Press A to Skip to next folder$eol$Press B to Cancel Script"
EndDraw

Input
 If %_GP_Y% == "1" GOTO RenameFolder
 If %_GP_A% == "1" GOTO NextSearch
 If %_GP_B% == "1" GOTO Cancel
Quit

:RenameFolder
RENAME  %HDDLoaderPath%\%search_name% %HDDLoaderPath%\%GameTitle%
ADD RenamerCounter 1
BeginDraw UseCurrent
  MessageBox "%search_name% has been renamed to %GameTitle% $eol$Folders Renamed: %RenamerCounter% $eol$Press A to find next match$eol$Press B to Cancel Script"
EndDraw

Input
 If %_GP_A% == "1" GOTO NextSearch
 If %_GP_B% == "1" GOTO Cancel
Quit

:NextSearch
SearchNext
GOTO SearchTop

:DoneSearch
EndSearch
IF %HDDLoaderPath% == "E:\\hddloader" GOTO FDriveSearch
GOTO SearchResults

:Cancel
BeginDraw UseCurrent
  MessageBox "PHDDLoader Folder Renamer Action Script Cancelled $eol$ Folders Renamed: %RenamerCounter% "
EndDraw
DELAY 3
QUIT

:SearchResults
BeginDraw UseCurrent
  MessageBox "PxHDDLoader Folder Renamer$eol$              Completed $eol$        Folders Renamed: %RenamerCounter% $eol$ Please REBOOT XBOX NOW $eol$    for changes to take effect"
EndDraw
DELAY 10
ResetMenuCache
QUIT

Do I have to edit anything here or will the one FlattSpott wrote down be ok to use?
Not sure if its any different to what I'am using but will fire it up later on tonight.
If neither are ok is there a plan C ????
Thanks everyone so far for your help.

Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #5 on: April 20, 2004, 12:04:00 AM »

Ohh..and before I forget, is there a way to make this autorun so when a new game folder is added to the pxhddloader folder it automatically renames it to the games name or do I have to do it manually everytime?
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #6 on: April 20, 2004, 02:17:00 AM »

Nope..sorry FlattSpott it didnt work, same problem with : in the games name.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Pxhddloader Script
« Reply #7 on: April 20, 2004, 06:13:00 AM »

QUOTE (Rodstorm @ Apr 20 2004, 06:10 AM)
Nope..sorry FlattSpott it didnt work, same problem with : in the games name.

You might try and use the replace function to replace the ":" with ""
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Pxhddloader Script
« Reply #8 on: April 20, 2004, 06:54:00 AM »

QUOTE
You might try and use the replace function to replace the ":" with ""


That's what i was originally thinking, but I thought FatXify was spose to take care of that.

This post has been edited by flattspott: Apr 20 2004, 01:55 PM
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Pxhddloader Script
« Reply #9 on: April 20, 2004, 07:35:00 AM »

QUOTE (flattspott @ Apr 20 2004, 10:47 AM)

That's what i was originally thinking, but I thought FatXify was spose to take care of that.

It should... I'm not sure why it wouldn't work for him.


It could be that he needs to specify the replacement character:

SETFUNC Temp FatXify %GameTitle% ""
Set GoodTitle %Temp%


Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #10 on: April 20, 2004, 12:56:00 PM »

Thanks guys, will give it a go tonight when I get home from work smile.gif
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #11 on: April 21, 2004, 12:08:00 AM »

Hi guys,
Still not working, this is how it looks now, I tried adding the """" straight after the %gametitle% and then again with a space to see if that would work and it didnt.
The : I was talking about isnt in the script, its in the title of the games name so for some reason this script wont recognise the puncuation and wont change the game folder name because it doesnt understand what the character is.
The error message I get is ERROR (line 1):(callfile)"ActionScript file failed execution" if that helps. All the other game folders renamed ok and this is the only thing the ones that didnt have in common.
Has anyone else had this problem with NFS Underground, Dues Ex Invisible Wars and Spawn Armageddon?
Anyway guys see what you think and let me know if its fixable.
Thanks for your time and help and Ben shouldnt you be working on the new mxm dash smile.gif


<Action>
;PxHDDLoader Renamer MXM Action Script
;Written by DBZRacer
;Purpose: This MXM action script searches for folders created by PxHDDLoader in your E and F drive and
;prompts you if you want to rename the undescriptive PXGame0000 folder name to the more descriptive XBE Title.

:Start
BeginDraw UseCurrent
MessageBox " - PxHDDLoader Folder Renamer - $eol$Press X to Rename folders in Drive E$eol$Press Y to Rename folders in Drive F$eol$Press B to Cancel"
EndDraw
Input
If %_GP_Y% == "1" GOTO FDriveSelected
If %_GP_X% == "1" GOTO EDriveSelected
If %_GP_B% == "1" GOTO Cancel
Quit

:FDriveSelected
SETFUNC FolderEmpty PATHEMPTY F:\hddloader
IF %FolderEmpty% == "1" GOTO FolderNotFound
SET HDDLoaderPath "F:\\hddloader"
GOTO DefineSearch

:EDriveSelected
SETFUNC FolderEmpty PATHEMPTY E:\hddloader
IF %FolderEmpty% == "1" GOTO FolderNotFound
SET HDDLoaderPath "E:\\hddloader"
GOTO DefineSearch

:FolderNotFound
BeginDraw UseCurrent
MessageBox "PxHDDLoader Root Folder Not Found on Drive"
EndDraw
Delay 2
QUIT

:DefineSearch
BEGINSEARCH %HDDLoaderPath%\pxgame*
GOTO SearchTop

:SearchTop
IF %search_type% == "dir" GOTO DIRFound
IF %search_type% == "file" GOTO NextSearch
GOTO DoneSearch

:DIRFound
SETFUNC GameTitle XBETITLE %HDDLoaderPath%\%search_name%\default.xbe

SETFUNC Temp FatXify %GameTitle% ""
Set GoodTitle %Temp%

BeginDraw UseCurrent
MessageBox "%GameTitle% found in %search_name% folder$eol$Press Y to RENAME %search_name% to %GameTitle%$eol$Press A to Skip to next folder$eol$Press B to Cancel Script"
EndDraw

Input
If %_GP_Y% == "1" GOTO RenameFolder
If %_GP_A% == "1" GOTO NextSearch
If %_GP_B% == "1" GOTO Cancel
Quit

:RenameFolder
RENAME %HDDLoaderPath%\%search_name% %HDDLoaderPath%\%GoodTitle%
BeginDraw UseCurrent
MessageBox "%search_name% has been renamed to %GameTitle%$eol$Press A to find next match$eol$Press B to Cancel Script"
EndDraw

Input
If %_GP_A% == "1" GOTO NextSearch
If %_GP_B% == "1" GOTO Cancel
Quit

:NextSearch
SearchNext
GOTO SearchTop

:Cancel
BeginDraw UseCurrent
MessageBox "PHDDLoader Folder Renamer Action Script Cancelled"
EndDraw
DELAY 5
QUIT

:DoneSearch
EndSearch
BeginDraw UseCurrent
MessageBox "PxHDDLoader Folder Renamer$eol$ Completed $eol$ Please REBOOT XBOX NOW $eol$ for changes to take effect"
EndDraw
DELAY 10
ResetMenuCache
QUIT
</Action>
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #12 on: April 25, 2004, 04:02:00 AM »

Hi guys, no more ideas with this?
The problem is still there so I'am not sure what to do.
Thanks for your help.
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Pxhddloader Script
« Reply #13 on: April 25, 2004, 05:27:00 AM »

Well I don't use HDDLoader myself. Maybe later though, I'll make a mock directory and manually edit an XBE to have a : and see if i can get it to work.
Logged

Rodstorm

  • Archived User
  • Full Member
  • *
  • Posts: 115
Pxhddloader Script
« Reply #14 on: April 25, 2004, 05:59:00 AM »

Thanks mate, really appreciate it...I dont think many people do use hddloader anymore so I might have to start using dvd2xbox like everyome else.
It would be good to get the 4 game folders renamed though, I hate the px folder name sad.gif
Logged