REM Convert a uupath to arguments (replace bangs with spaces). REM Optionally if the first argument is a command, run it with the rest of the arguments. REM Usage: path2arg.bas [command] IF ARGC% < 2 THEN PRINT "Usage: path2arg.bas [command] " : END HOSTNAME$=TH_SED$(TH_HOSTNAME$,"\s.*","") PATH$=TH_SED$(ARG$,HOSTNAME$,"","g") PATH$=TH_SED$(PATH$,"!"," ","g") IF ARGV$(1) = "run" THEN GOTO 10 IF TH_RE(DIR$,"[^w]"+ARGV$(1),0) > 0 THEN GOSUB 10 PRINT PATH$ END 10 PRINT "Running "+PATH$ TH_EXEC PATH$ END