TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: `JAMES C. SEWELL`
date: 1997-09-04 03:45:00
subject: Changing dirs (was: RE: Macro documentat03:45:1509/04/97

From: "James C. Sewell" 
>So now, in my personal tse.ui, I have
>an item on the file menu called "Change Dir...", which calls the following
>simple macro:
This is similar to a macro I have which I will share in case it is helpful.
 Often I will be editing a file and want to shell to that directory to do
something but my default directory has been changed by loading other files
or using macros.  I put this macro on a menu I use often and it is the
default option of that menu (mainly because this one is harmless.
"elete current file from disk" wouldn't make a good default )
Anyway, 2 keypresses later I'm in the right directory so when I shell I can
do what I want.
It's nothing elegant, but for what it's worth:
proc mSetPathToCurrent()
   string path[25]
   string drive[25]
    path=SplitPath(CurrFilename(),_PATH_)
    drive = SplitPath(CurrFilename(),_DRIVE_)
    LogDrive(drive)
    ChDir(path)
    message("Path now set to "+drive+path)
end
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.