Page 1 of 1

Executables are run from FC directory instead of current

Posted: 03.12.2007, 16:26
by axel668
Hi !

When running a batch file by double- clicking in FreeCommander I would expect that it runs in the current directory, like in cmd or explorer. FC runs it from its own FC installation directory, which leads to "file not found" errors in my start.bat on my USB pen drive (which contains relative paths, for obvious reasons).

Could not test if the behaviour is the same for .exe files, but I suppose it is. This could lead to problems when running .exe / .bat files directly in FC, which is very common in a pen drive scenario ...

This is easy to work around, of course (start a DOS prompt) and low priority, but think it's a bug, anyway.

Best regards, A.

Posted: 03.12.2007, 21:15
by Marek
I know only the problem with 'open' from the context menu viewtopic.php?t=309.

I can not reproduce the problem for double-clicking.

Re: Executables are run from FC directory instead of current

Posted: 15.04.2011, 09:40
by acw1668
I have the same issue when using Free Commander XE 0.0.0.532 public preview

Re: Executables are run from FC directory instead of current

Posted: 15.04.2011, 16:58
by Marek
Could you provide some description what does not work?

Re: Executables are run from FC directory instead of current

Posted: 16.04.2011, 06:37
by acw1668
Create a batch file in, for example, c:\temp directory with the following content:

@echo off
echo Current directory is:
echo.
pwd
echo.
pause



Then, navigate to C:\temp directory in Free Commander XE (0.0.0.532 public preview), and double-click the batch file to run it. The output is:

Current directory is:

C:\Program Files\FreeCommander XE

Press any key to continue . . .

The current directory is supposed to be C:\temp, but now is the FC installed directory.

Re: Executables are run from FC directory instead of current

Posted: 16.04.2011, 14:04
by Marek
Your example was useful. It is fixed now.