sarami wrote:>superg
This has been written to KnownIssue.txt as "Extension problem" since several years ago.
If you want to escape this problem without new coding, you should specify the extension.
sarami, I modified my splitPath implementation so it behaves exactly like _tsplitpath except the case where path has multiple dots: last dot is used as an extension start (in contrary to _tsplitpath where the first dot is used as an extension start).
I tested the following cases:
1. Absolute path with filename, extension and additional dots in the path and filename:
command line: 'cd G "E:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin" 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: E:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin
FullPath: E:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin
Drive: E:
Directory: \temp\ISO\TEST Vol. 9 (USA)\
Filename: TEST Vol. 9 (USA)
Extension: .bin
result: "e:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA)*.*"
2. Relative path with filename, extension and additional dots in the path and filename: (that's how DICUI is passing the command line)
command line: 'cd G "ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin" 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin
FullPath: E:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA).bin
Drive: E:
Directory: \temp\ISO\TEST Vol. 9 (USA)\
Filename: TEST Vol. 9 (USA)
Extension: .bin
result: "e:\temp\ISO\TEST Vol. 9 (USA)\TEST Vol. 9 (USA)*.*"
3.Filename without extension:
command line: 'cd G "TEST Vol_ 9 (USA)" 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: TEST Vol_ 9 (USA)
FullPath: E:\temp\TEST Vol_ 9 (USA)
Drive: E:
Directory: \temp\
Filename: TEST Vol_ 9 (USA)
Extension:
result: "e:\temp\TEST Vol_ 9 (USA)*.*"
4.Filename with extension:
command line: 'cd G "TEST Vol_ 9 (USA).bin" 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: TEST Vol_ 9 (USA).bin
FullPath: E:\temp\TEST Vol_ 9 (USA).bin
Drive: E:
Directory: \temp\
Filename: TEST Vol_ 9 (USA)
Extension: .bin
result: "e:\temp\TEST Vol_ 9 (USA)*.*"
5.Filename with extension and additional dot in the name:
command line: 'cd G "TEST Vol. 9 (USA).bin" 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: TEST Vol. 9 (USA).bin
FullPath: E:\temp\TEST Vol. 9 (USA).bin
Drive: E:
Directory: \temp\
Filename: TEST Vol. 9 (USA)
Extension: .bin
result: "e:\temp\TEST Vol. 9 (USA)*.*"
6.usurper previously failing command line:
command line: 'cd G Track 20 /c2 20 /nl'
DIC debug output:
CurrentDirectory
E:\temp
WorkingPath
Argument: Track
FullPath: E:\temp\Track
Drive: E:
Directory: \temp\
Filename: Track
Extension:
result: "e:\temp\Track*.*"
In my first implementation I was unaware that filename can be specified without the extension and that's legit. Let me know if you think I'm missing some additional usecases.