START /D

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Nov 22, 2010
4
0
#1
I am having problems with START /D - which is supposed to start a new window in a specified directory. Here is an example (with variants).

START /DMaths
START /DC:\Maths
START /DC:\Maths\

which I hoped would start a TCC window open in the c:\Maths directory. The problem is that I have a tcstart.btm file which ends with a cd command to another directory, and of course that's where I end up instead. (I don't want to remove that command, since I really don't want TakeCommand to start in its program directory, which is where it starts by default.) The tcstart.btm file does start with the line

if %_pipe != 0 .or. %_transient != 0 quit

which is supposed to cause it to be ignored for instances created by START (or similar commands), but it doesn't seem to work in this case.

Help with this will be very gratefully received, but I might as well mention the *real* problem I have, which is a variation on this. I want to be able to call my editor from the TakeCommand (or rather TCC) commandline, with a START command so it's in a different window (leaving the commandline free for my other uses). But if I call it with a simple START EDITOR FILE command, then the editor starts in my default directory, and so cannot find the FILE. :(

As ever, many thanks in advance.

-= rags =-
 
#2
On Thu, 08 Sep 2011 18:22:54 -0400, rags <> wrote:

|The first is simply (I'll give some variants)
|
| START /DMaths
| START /DC:\Maths
| START /DC:\Maths\
|
|which I hoped would start a TCC window open in the c:\Maths directory. The problem is that I have a tcstart.btm file which ends with a cd command to another directory, and of course that's where I end up instead. (I don't want to remove that command, since I really don't want TakeCommand to start in its program directory, which is where it starts by default.) The tcstart.btm file does start with the line
|
| if %_pipe != 0 .or. %_transient != 0 quit
|
|which is supposed to cause it to be ignored for instances created by START (or similar commands), but it doesn't seem to work in this case.

START, by default, starts an enduring instance of TCC. It's no surprise it's
not caught by your IF statement. And as for startup directories, TCSTART has
the last say except for any commands on the command-line itself. So use:

Code:
START cdd C:\Maths
That said, CDDing to an initial directory in TCSTART can be quite inconvenient,
as you observed. How do you usually start TCC (in the usual directory) ...
shortcut, toolbar, Start\Run, ... ? Whatever, chances are you can modify that
slightly to put it in the usual place without TCSTAR doing it. Shortcuts and
all toolbar apps I've seen allow specifying a startup directory. And even in
Start\Run you could specify "tcc /k cdd usual_dir"; which could be easily
recalled.
 
Nov 22, 2010
4
0
#4
I assume the editor is a console app, not a gui, yes? Vince's suggestion is good. You could also create an alias like

start editor "%@full[%@quote[%1]]"
Many thanks to you both - I'll ponder (and experiment) with these ideas to see what fits my habits best ...