Start by shelling CTRL-] from BR, and try the command directly from the CMD prompt. That often helps to figure things out.
The second issue. pjcbcb~1.exe is the "8.3 Short Name" for the file. It is not actually the "Guaranteed Name", for example it might end up being pjcbcb~2.exe . This is particularly true when you start moving things around, renaming, etc.
The "Long term answer" is to use the "LONG NAME"
For example instead of C:\Progra~1, use C:\Program Files.
The good news is that BR is able to help with this type of task, so it doesn't have to be manual.
We export our source code to a folder on the network, and then using Notepad++, we can search for text in programs. In this case, a regular expression. Before we did this, we wrote BR scripts to perform similar tasks (Through every program).
Sounds to me you want something like List '~1' '.exe'
The "Regular Expression" for Notepad++ would be: .*~1.*\.exe
Basic Reference document for Regular Expressions http://www.aprelium.com/abyssws/articles/regex-basics.html
The "Proc" in BR to fix something like this would be
Code: Select all
list 'pjcbcb~1.exe' rep 'pjcbcb long version.exe'
list 'pjcbcb~1.exe' rep 'pjcbcb long version.exe' >redir.[session]
list 'other~1.exe' rep 'otherlong version.exe'
list 'other~1.exe' rep 'otherlong version.exe' >redir.[session]
The you just load the program (In a proc if you like I think there is a RELOAD sample somewhere).
PS: I intentionally ignored "Quotes", and that might matter as long file names tend to use quotes.
We build a Library:
23120 DEF LIBRARY Fnexe(Exe_Parameters$*32,Exe_Name$*256;Exe_Filename$*256,Exe_Add_Parameters$*2048)
The we call the fnexe as appropriate.
using your example
FNEXE("-M QUOTES=NONE","execute “sy –M f:\pjc_apps\bcbs_mst.01\pjcbcb~1.exe”,"Optional_Filename_1","Optional Additional Parameters")
Quotes=None is an option the FNEXE recognizes, it tells it not to add quotes to the "EXE_FILENAME$"
By using a library, you can perform quite a bit of cleanup, trap for problems, etc. It is also a good way to prepare for Client Server.