Hi..
EG> do you think you or someone else (if they step forward) could
EG> alter that macro a bit so it can change paths each time you start
EG> a d/l?
EG>
EG> eg-
EG> {call dl_path}
EG>
EG> {:dl_path}
EG> [...]
EG> disp
EG> A - New D/L path
EG> [Enter] - Current D/L path
EG>
EG> Current d/l path = default path in *.set if never changed with A
EG> option or last path used if A was previously chosen.
Try this on for size:
-----
{:DL_PATH}{SETV temp1}{CLEA}
{COMP t_dir}{IFCO ,dl1}
{SETV t_dir,%dldir}
{:DL1}
{SETG 8,t_out}
{DISP 3,20,0e,Current D/L Path = %t_dir }
{DISP 4,20,0e,Select A New Download Path (Y/n)? }
{GETS-I ch,2,newpath}{COMP ch,y}{SETV ch}{IFCO ,t_out}{CLEA}
{:NEWPATH}
{INPU temp1,New D/L Path (Include Trailing "\") = %t_dir }
{FILE %temp1%*.*}{IFCO np1}
{INPU ch,PATH Doesn't Exist..Create it (Y/N)? }
{COMP ch,y}{SETV ch}{IFCO ,dl_path}
{EXEC md %temp1}
{:NP1}
{SETV t_dir,%temp1}
{:T_OUT}{CLEA}{RETU}
------
NOTE: Add a "CALL dl_path" preceeding all protocol command lines,
and specify "%t_dir" as your target d/l directory in all your protocol
command lines. Also, after answering "Y"es to "Create Directory?"
question, you *MUST* include the trailing backslash when you enter
the directory info.
EG> * IMPORTANT * The macro must also be able to create a DIR.
EG> "Specified path doesn't exist, create it?" if ans=No go back to
EG> :dl_path
The above does that. Another note: I'm using NDOS (4DOS). During my
tests of the above, I was able to create a directory on any drive using
the sample macro. I'm not sure if DOS is so flexible, i.e., if it will
allow you to "md d:\dir\" from the "c" drive. If it isn't, then you
might be restricted to creating directories on the same drive as
{COMMO}. You'll find that out through testing, I suppose. It's been
an awfully long time since I used plain dos :) I'm running OS/2 on
my other machine.
EG> Thanks for any input you have..
If the above meets your needs, I can work on the "esthetics" later. I'm
not much into "pretty", more into "function".
Jim
--- JCQWK
---------------
* Origin: Meredith Place Mail Drop (1:300/15)
|