Results 1 to 3 of 3

Thread: Long File Names as a Command Line Parameter

  1. #1

    Thread Starter
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141
    I'm having trouble with Long File Names being changed to the short MS-DOS filename when supplied as a Command Line Parameter. I use the "Command" function to retrieve the command line parameter and I've got my application set up in the "SEND TO" context menu so if I right click on any file, choose "Send To" and then pick myapp as the Send To destination, my application will take the file I've selected and process it. It works great for the old limited DOS Directory Names and 8.3 file names, but not for long directory names or long file names.

    Example: If I pick the file:
    "C:\My Documents\Junk Stuff\Long File Name Here.txt"
    and do the SEND TO on it, my application ends up with the file name:
    "C:\MYDOCU~1\JUNKST~1\LONGFI~1.TXT"

    I've tried using "%1" as a command line argument in the SEND TO shortcut, but that still doesn't work.

    Does anyone know how to get the normal long file name to come thru? Any help would be appreciated.
    JC

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    Try putting quotes around the file name.

    'if stored in VB
    """C:\My Documents\Junk Stuff\Long File Name Here.txt"""

    This sometimes sorts out those problems.
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Addicted Member jcouture100's Avatar
    Join Date
    Aug 1999
    Posts
    141
    I already tried it. No Luck. Any other suggestions?
    JC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width