10-27-2021
11:45 AM
- last edited on
11-04-2024
03:22 PM
by
Content Cleaner
I'm experimenting with SeqEdit.exe CLI. I found /setCurrentDir
potentially useful. According to the documentation:
/setCurrentDir
instructs the application to set the current directory to the first directory in the File dialog box directory history list, as shown in the following example:SeqEdit.exe /setCurrentDir
The current directory is the directory the File dialog box initially displays when you open or save a file. Use this option to instruct the File dialog box to display the directory the File dialog box displayed the last time you ran the application. TestStand sets the current directory after processing the other command-line options.
I have run a couple of tests and it seems that directory history is set to the current directory only if I trigger an error.
I have two bat scripts: WithoutError.bat
and WithError.bat
:
REM "WithoutError.bat"
@ECHO OFF
START "Teststand" "%TestStandBin%\SeqEdit.exe" /setCurrentDir
REM "WithError.bat"
@ECHO OFF
START "Teststand" "%TestStandBin%\SeqEdit.exe" /setCurrentDir "C:\A\B"
I run them from C:\
and from C:\A\B
. Here are the results of my experiments:
C:\>C:\A\B\WithoutError.bat
No Error
Directory History: C:\Users\micha\Desktop
C:\>C:\A\B\WithError.bat
Error: Unrecognized command line argument 'C:\A\B'
Directory History: C:\
C:\A\B>WithoutError.bat
No Error
Directory History: C:\Users\micha\Desktop
C:\A\B>WithError.bat
Error: Unrecognized command line argument 'C:\A\B'
Directory History: C:\A\B
As you can see, the directory history is correct only if I have an error.
Is this a bug?