PDA

View Full Version : %1 variable and long filenames?



0x20
01-31-2002, 04:21 PM
Hi,

I'm trying to create a context menu addition which will create an m3u playlist from a right click on a folder in Explorer (XP). I'm in the key

HKEY_Local_Machine\Directory\shell\MakeM3U\Command

(made by me). My default data for this key is

cmd.exe /c dir /b /on *.mp3 > "%1".m3u

Which works fine, except with >8.3 folder name, in which case it creates files like "JAZZST~1.m3u". I'd like it to work with long filenames too. I've experimented unsuccesfully quite a bit and It seems that the variable %1 always returns 8.3 filenames. Any suggestions?

0x20
02-03-2002, 08:00 PM
anyone?

POBrien
02-03-2002, 08:02 PM
I worked on it for two hours the other day. I didn't have any luck. Hopefully someone else will.

I think Your idea is excellent!

POBrien
02-03-2002, 08:45 PM
After I posted, I read through the 2000 resource kit.

How about drilling down to..

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Contro l\FileSystem]

and change the

"NTFSDisable8dot3NameCreation"

from dword:00000000

to

dword:00000001

reboot

mnovak5
02-04-2002, 10:16 AM
Great idea!
For Windows 98 users the synatx is

command.com /c dir /b /on *.ext > file

where <ext> goes for the extension you are looking for and file is the name of the output file.
Great when you look for documents and want to have their list (combine this with the creation date of the list file).

Michael

0x20
02-07-2002, 01:25 PM
Hmm, I replied to this last night but it doesn't seem to have shown up.

Thanks for the replies... I've set the disable8dot3 key to 1 as per your suggestion, but it had no effect. Have you tried it yourself?

I just hacked up a quick executable to use in place of dir, if it works out I'll post it somewhere.

Thanks guys!

POBrien
02-07-2002, 04:25 PM
Hey 0x20,

I'm not sure whats up with the missing posting. If it happens again, please let me know and I'll inform Simon.

No, I didn't test it out before posting. That's disheartening news... I thought that may have been it. I try myself and if I have a different outcome, I'll post back.

Thanks for the offer of tentatively posting the executable.

Patrick (http://www.winguides.com/forums/sendprivate.php?Cat=&User=POBrien&Board=&Number=&what=online&page=&view=&sb=&part=&vc=><font)</font color=green> /images/forums/icons/smile.gif
<a target="_blank" href=https://www.regnow.com/softsell/nph-softsell.cgi?item=5006-1>WinGuides</a>