xboxscene.org forums

Author Topic: Exec %variable% Problems  (Read 296 times)

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Exec %variable% Problems
« on: February 02, 2004, 08:19:00 PM »

im having trouble with the EXEC command when i have it execute a variable, for example...
CODE

SET FILEn "C:\\\default.xbe"
EXEC "%FILEn%"

will work fine, but when i do this (add a directory to the variable):
CODE

SET FILEn "C:\\\folder\\\default.xbe"
EXEC "%FILEn%"


it wont work
the forum probably screwed up my backslashes, there are THREE backslashes where you might see one or two.  The three are necessary because it goes through 2 sets of quotes.  Any help would be great.

This post has been edited by tayior7 on Feb 3 2004, 04:20 AM
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Exec %variable% Problems
« Reply #1 on: February 02, 2004, 08:28:00 PM »

I don't think you need any extra backslashes if the content is in a variable.  

Try:
CODE
SET FILEn "C:\\default.xbe"
EXEC "%FILEn%"
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Exec %variable% Problems
« Reply #2 on: February 02, 2004, 08:32:00 PM »

i did, and it didnt work
the problem is that the extra folder messes it up, 3 backslashes work if i want to boot something off of the root, but if i want to boot somethng in a folder, it wont work.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Exec %variable% Problems
« Reply #3 on: February 02, 2004, 06:45:00 PM »

sad.gif
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Exec %variable% Problems
« Reply #4 on: February 02, 2004, 06:48:00 PM »

biggrin.gif
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Exec %variable% Problems
« Reply #5 on: February 02, 2004, 07:10:00 PM »

QUOTE (tayior7 @ Feb 2 2004, 11:48 PM)
soooo, whens this new release comin? biggrin.gif

I'm working on it (see the parent forum to this one for more details).
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Exec %variable% Problems
« Reply #6 on: February 02, 2004, 09:43:00 PM »

for anyone else interested, we found a work around...

set path "c:\\evox"
set filen "evoxdash.xbe"
CD %path%
EXEC %filen%
Logged

flattspott

  • Archived User
  • Hero Member
  • *
  • Posts: 1220
Exec %variable% Problems
« Reply #7 on: February 03, 2004, 10:14:00 AM »

Yep, I told told BenJeremy about this problem a few days ago.
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Exec %variable% Problems
« Reply #8 on: February 03, 2004, 05:05:00 PM »

...and I've got a fix coming. The basic problem was that the original command was designed to support the FTP server, so I wasn't processing the path correctly. I will be testing the fix tonight.
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Exec %variable% Problems
« Reply #9 on: February 03, 2004, 07:58:00 PM »

awesome,
another bug (you might already know about it, i think i posted it somewhere else) is that when copying a directory with a file without and extension inside the directory the copy will fail.
hope that made sense
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Exec %variable% Problems
« Reply #10 on: February 03, 2004, 08:18:00 PM »

QUOTE (tayior7 @ Feb 3 2004, 10:58 PM)
awesome,
another bug (you might already know about it, i think i posted it somewhere else) is that when copying a directory with a file without and extension inside the directory the copy will fail.
hope that made sense

 That's a bit trickier, as no extension confuses matters, from strictly a naming issue.

I'll have to take another look at the COPY command soon.
Logged

tayior7

  • Archived User
  • Full Member
  • *
  • Posts: 195
Exec %variable% Problems
« Reply #11 on: February 04, 2004, 02:47:00 PM »

it might be on all commands like that, i think i got the same error on delete or rmdir or something, not sure though, but it shouldnt be too much of a problem because people rarely use files w/o extensions.

What i did when this happened was manually rename the file liek so..
file to file.t
Then in the script i did...
copy D:\folder C:\
Rename C:\file.t C:\file
that worked fine
Logged