I think I have run into a bug with the editor2 included with the last version of xplorer2_lite (1.1.0.3). The about window shows version 2.6.0.5.
The problem occurs when using editor2 at the command line or from a batch file. What happens is that if I try to load a file into editor2 without providing a full path editor2 looks for the file in the directory saved in the sxInitialFolder registry key.
for example:
with c:/some-folder as the current dir containing some-file
editor2 some-file
will give an error c:/another-folder/some-file does not not found
where c:/another-folder is the folder in the szInitialFolder key
editor c:/some-folder/some-file
works fine.
The unicode version (2.6.0.5) of editor2 included with xplorer2_pro does not seem to have this problem; although, when I was using both versions (with two sets of registry keys) it seemed that the problem happened with either version.
The fix was to clear out both sets of editor2 registry keys and replace the editor2 file in the xplorer2_lite dir with the unicode version. So now there is only one set of keys in HKEY_CURRENT_USER\Software\Zab... for editor2UC and I am using only one version of editor2.
Later,
Daniel
command line bug in editor2 version 2.6.0.5 (x2 lite)
Moderators: fgagnon, nikos, Site Mods
nikos wrote:this is by design
ed2 "cd's" to the folder stored in sxInitialFolder
Running editor2 2.5.0.5 non-unicode version, MOST of the time launching editor2 from the command line and opening a file in the current directory (no path specified) works just fine and other times it won't. I've not been able to discern a pattern as to when it works ok and when it doesn't. If it's by design then it's not always doing a cd to the sxInitialFolder. I would rather it NOT do this anyway since the majority of the time it works as I'd like (no path name needed). Could this be made an option to NOT do the cd to sxInitialFolder when it's being run from the command line (assuming that editor2 can detect it's running from the command line).