Title: | Microsoft Visual Basic |
Moderator: | TAMARA::DFEDOR::fedor |
Created: | Thu May 02 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2565 |
Total number of notes: | 10453 |
Hello everyone, I have some questions about long file name. Questions: (1) When using Shell function, one can be able to specify : tid% = Shell ("Executable_Image_File To_Be_Read_Data_File" , n) like this, starting up the .EXE file with mode reading the data file. However, if those files are not 8+3 format (long file name format) or containing spaces (which is allowed in the file system), VB returns an error message. Error when the file specification containing space is understandable, perhaps VB thinks the space as the clause delimitter. How do I be able to specify those file in Shell Function ? I tried quoting those files, but all failed. (2) Suppose the above question is tricky to solve... Okay, I will go into an another way : How do I get short file name format (8+3 format) from an existing long file name ? Any inputs are deeply appreciated. Thank you in advance, Yuichiro Ohtsuka (Tokyo, Japan)
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2509.1 | Use API call ShellExecute instead | ELIS::TOWERS | Tue Mar 04 1997 03:00 | 10 | |
You might like to look at the ShellExecute function in the shell32.dll. This is what I usually use instead of Shell. Here is the declaration: Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _ As String, ByVal lpFile As String, ByVal lpParameters As String, _ ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Cheers, Brian | |||||
2509.2 | thank you ! | TKOVOA::OTSUKA_Y | [email protected] | Tue Mar 04 1997 05:26 | 8 |
RE: #2509.1 (.-1) ; Thank you, Brian-san ! Now the program seems working correctly. This solved my problem. Thank you. /Yuichiro Ohtsuka |