Topic: Change directory (1 of 9), Read 133 times
Conf: Startup, File Open, Exit
From: Deleted User
Date: Sunday, June 06, 1999 05:44 PM

I can't seem to get the Change Directory function to work as described in the manual and help file. I check the box and change directories. The next time I open the dialog, I am right back where I was the first time. It does seem to work if I open a file, but if I just try to change directories it doesn't. Can anybody tell me what I am doing wrong?

 


Topic: Change directory (2 of 9), Read 133 times
Conf: Startup, File Open, Exit
From: Scott Lambert
Date: Monday, June 07, 1999 10:24 AM

On 6/6/99 5:44:12 PM, Keith DeBrunner wrote:
>I can't seem to get the Change
>Directory function to work
>It does seem to
>work if I open a file, but if
>I just try to change
>directories it doesn't. Can
>anybody tell me what I am
>doing wrong?

The function is working right, if you load two files from different directories, marking that box will determine whether Vedit stays in the directory of the first file or changes to the second file's directory.

To do what you want, you need a small macro.

// chgfolder.vdm
get_input(9,"Folder Name = ",nocr+statline)
chdir(@9)

The macro will ask on the status line for the new directory, and then change to it.

If you are using the Windows version of vedit and certain folders most of the time, you might want to check out whereto.vdm in the macro library at www.pinc.com/~slambert.


Scott

 


Topic: Change directory (3 of 9), Read 140 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Tuesday, June 08, 1999 05:37 AM

>>I can't seem to get the Change
>>Directory function to work

The problem is that Vedit does not have a Change Directory function. It only changes directory when you open a file.

>To do what you want, you need a small
>macro.

I don't think that is what Keith wants, and at least not what I want. I don't want to type a cryptic pathname, especially when there is not even an option to use DIR command.

I have been missing the Change Directory function, too. Now, if you want to change directory, you have to tick the "change directory" box, then open a file (and then close it since you really didn't want to edit that file). Then you have to remember to un-tick the "change directory" box before you open another file if you do not want to change directory again.

Perhaps the best way would be if there was a "Change directory" button in the File Open dialog box. You could then go to directory you want, click this button, and then close the dialog box.

-- Pauli

 


Topic: Change directory (5 of 9), Read 136 times
Conf: Startup, File Open, Exit
From: Deleted User
Date: Tuesday, June 08, 1999 12:46 PM

Precisely. An explicit control would be much better. Scott, thank you for the suggestions, but they must be considered work arounds, not a complete solution.

(sorry about the lack of a topic in the original post)

 


Topic: Change directory (8 of 9), Read 120 times
Conf: Startup, File Open, Exit
From: Ted Green
Date: Tuesday, June 15, 1999 09:51 AM

>>To do what you want, you need a small macro.
>I don't think that is what Keith wants, and at least not what I want.
>I don't want to type a cryptic pathname, especially when there is not
>even an option to use DIR command.

The following keystroke macro assigned to a key might work:

[VISUAL EXIT] Get_Filename(103,"*")

It puts up a nice file-open dialog box and all you have to do is check the
"[ ] Change directory" box. The name of the selected file is simply copied
into text register 103, which shouldn't hurt anything.

>I have been missing the Change Directory function, too.

This function in older versions of VEDIT was just too confusing to new
users.

>Perhaps the best way would be if there was a "Change directory" button
>in the File Open dialog box.

It is a good suggestion, but also likely to confuse users that only
understand a normal File-open dialog box.

Perhaps one solution would be an option on the Get_Filename() command
which automatically sets the "Change directory" box just for that
command. Then the macro could be placed in the {USER} menu as
"Change directory".

 


Topic: Change directory (4 of 9), Read 139 times
Conf: Startup, File Open, Exit
From: Christian Ziemski
Date: Tuesday, June 08, 1999 08:02 AM


That doesn't work.
The Chdir() doesn't change the default directory of the file-open-dialog.
In fact Chdir() behaves a bit strange...

I tried such a function a bit more comfortable with:

#105=Buf_Num
Get_Filename(105,"*.*") // choose a file from the desired directory here
BS(Buf_Free())
File_Open(@105,FORCE+CHGDIR)
Buf_Quit(OK)
BS(#105)

but after quitting the temporary file the default directory of the file-open-dialog is the old one again...

It seems to be impossible to change it.

Maybe there is a solution, but I can't find it now.


Christian

 


Topic: Change directory (6 of 9), Read 129 times
Conf: Startup, File Open, Exit
From: Scott Lambert
Date: Friday, June 11, 1999 11:26 AM

On 6/8/99 8:02:34 AM, Christian Ziemski wrote:
>
>That doesn't work.
>The Chdir() doesn't change the
>default directory of the
>file-open-dialog.
>In fact Chdir() behaves a bit
>strange...

I have come up with an explanation as to what is happening, and have put a detailed
write-up of it in the Program Quirks section of my website at www.pinc.com/~slambert, and also a macro that makes use of the workaround, and "solves" (???) the problem that started this thread.

Comments Welcomed.

Scott

 


Topic: Change directory (7 of 9), Read 127 times
Conf: Startup, File Open, Exit
From: Pauli Lindgren
Date: Monday, June 14, 1999 05:41 AM


>That doesn't work.
>The Chdir() doesn't change the
>default directory of the
>file-open-dialog.

It is not supposed to.
The default directory for file-open-dialog is the directory of the file in the current buffer.

This is quite useful feature. If you have several files open from different directories, you can use any of these directories as default directory by selecting the window of that file.

However, the actual default directory is used for macros (such as wildfile.vdm), and therefore it is necessary to be able to change it.

-- Pauli

 


Topic: Change directory (9 of 9), Read 126 times
Conf: Startup, File Open, Exit
From: Ted Green
Date: Tuesday, June 15, 1999 09:55 AM

At 08:05 AM 6/8/99 EDT, you wrote:
>The Chdir() doesn't change the default directory of the file-open-dialog.
>It seems to be impossible to change it.

The startup directory of the File-open dialog box is the directory of
the file in the current buffer. This little "feature" serves the
change-directory needs of most users.

If you switch to an empty buffer with , then the file-open
dialog box starts in the "current" directory which can be changed with
the Chdir() command.

Another way to change directory is to select a recently edited file in
that directory from the MRU list in the {FILE} menu. Then press
to open another file in that directory.

BTW - I'm sorry for the slow reply. I immediately replied
by e-mail but that somehow didn't get posted.
Ted.