sendto filename length

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sttrebo
Posts: 68
Joined: 27 Jan 2014, 12:31

sendto filename length

13 Feb 2014, 16:17

I'm sure I'm missing something simple, but I can't seem to find an answer. I am working on a small script that is called from windows7 sendto context menu. What I want it to to is:
Select a file in explorer
right click and select sendto and send it to my ahk script. this works just fine.
in my script i have:
full_inputfile = %1%
everything works great as long as the selected file is only 8 characters long. but if the file is over 8 characters long, then the short 8dot3 is fed to my script. for example:

if i select 1234.jpg then 1234.jpg is fed to my script
if i select 1234567890.jpg then 123456~1.jpg is fed to my script

how do i fix this?

thanks
SKAN-NLI

Re: sendto filename length

13 Feb 2014, 17:30

You may convert 8.3 filepath to longpath as follows:

Loop, %1%, 2
full_inputfile := A_LoopFileLongPath
MsgBox % full_inputfile
sttrebo
Posts: 68
Joined: 27 Jan 2014, 12:31

Re: sendto filename length

13 Feb 2014, 18:02

excellent, thanks

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: kashmirLZ, mikeyww and 116 guests