Tech Support > Microsoft Windows > Development Resources > windows explorer passing parameters to console app?
windows explorer passing parameters to console app?
Posted by ken on May 28th, 2005


I'm looking for a way to pass the current directory name via the right-click
and send-to function in windows explorer. However, all I'm getting is the
8-3 format and I would like to pass the real file name (warts and all). Any
ideas as to how to get this to work?

TIA


Posted by ken on May 28th, 2005


I guess another way to ask this question (and keep it on topic) is there a
function that will convert an 8.3 filename to the long name format?

I looked through the MSDN help but don't find anything on point

BTW - using VS 6.0 SP6

TIA

"ken" <kaerickson@earthlink.net> wrote in message
news:q3Tle.1201$s64.911@newsread1.news.pas.earthli nk.net...


Posted by Alf P. Steinbach on May 28th, 2005


* ken:
Please don't top-post (except in [microsoft.*]), corrected.

Please don't malquote, such as breaking lines without adding
quote characters at the beginning, even when quoting yourself.

Installing OE QuoteFix can help you with that; recommended.


* ken:
Q: How do I get the long path name?
A: See GetLongPathName.

Hth.,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Posted by Alex Blekhman on May 29th, 2005


ken wrote:
Do you associate your program with an extension? If yes,
then doing it inpropery will cause the shell to treat you as
16-bit program and provide you with 8.3 paths. Here's the
explanation about it:

"How does Explorer detect whether your program supports long
file names?"
http://blogs.msdn.com/oldnewthing/ar...20/245072.aspx

Otherwise, if you only put shortcut in
"%USERPROFILE%\SendTo" folder then I can't see why system
will give short path. I made quick test and it always gets
long path names. Put this .CMD file in "SendTo" folder:

--- test.cmd ---
@echo off
echo %0
echo %1
pause
--- test.cmd ---

Then right-click on anything in Explorer and send it to
"test.cmd".




Similar Posts