Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

en-us names for ShellApp.GetDetailsOf columns, plz

10 views
Skip to first unread message

Alexander Mueller

unread,
Oct 17, 2009, 9:53:35 AM10/17/09
to
Hi

The following script lists the names of detail
identifiers as returned by ShellApp.GetDetailsOf
for the MyVideo or MyDocuments Shell folder.

Since Shell automation returns the names in
localized manner, e.g. I get German names on my
German XP machine, I would like to ask, if s.o.
could be as kind as to run the script on his/her
English Windows machine, pipe the output to file
and copy the file's content into a reply to
this post


//------ GetDetailsNames.js
var sh = new ActiveXObject("Shell.Application");
var CSIDL_PERSONAL = 0x0005; // My Documents
var CSIDL_MYVIDEO = 0x000e; // "My Videos" folder

var ns = null;
if (null == (ns = GetFolder(CSIDL_MYVIDEO)))
if (null == (ns = GetFolder(CSIDL_PERSONAL)))
WSH.Quit();

WSH.Echo("Folder:", ns.Self.Path);
WSH.Echo("ID => DETAIL-NAME");
for (var i = 0; i < 100; i++) {
try {
var name = ns.GetDetailsOf(null, i);
if (typeof name == "string" && name.length > 0)
WSH.Echo( i, i <10 ? " ":"" ,"=>", name)
}
catch(ex) {
WSH.Echo(i, ex.number, ex.description)
}
};

function GetFolder(id) {
try {
return sh.Namespace(id);
}
catch(ex) {
return null;
}
}
//------ END GetDetailsNames.js

Btw you can redirect the output with the cmd-batch file
below


Thx very much for your help,
sorry for crossposting,
sorry for posting JS in m.p.s.vbscript,
Alex

//------ pipeNames.cmd
REM make sure pipeNames.cmd and GetDetailsNames.js
REM are locate din the same folder and that this folder is
REM is the active Directory of the CMD-prompt while running
REM this cmd-script

cmd /c cscript //NOLOGO .\GetDetailsNames.js > .\GetDetailsNames.txt


//------ END pipeNames.cmd

0 new messages