View Single Post
Old 07 May 2021, 18:43   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,000
As we are talking about running from Workbench as a default tool, I doubt that ReadArgs has anything to do with it.

Workbench presents its argument to the app as wa_Lock and wa_Name pairs. wa_Lock is a BPTR lock to the directory and wa_Name is the name of the file.

So I assume Par$() in this case only uses the wa_Name part and under OS 2.0+ ParPath$() uses NameFromLock() and AddPart() to combine the directory name and the file name.

However, if there was a means to get access to the wa_Lock part, then you could use CurrentDir() to change the current diectory and then access the file using wa_Name. Then you wouldn't need to care about the directory name. Even better, DOS would assure that you enter exactly the right directory. If you first turn it into a name it could be misleading as there can be multiple volumes with the same name.
thomas is offline  
 
Page generated in 0.04381 seconds with 11 queries