How to know the corresponding file name of a folder

  • Thread starter chenzero
  • Start date Views 1,053
Status
Not open for further replies.
C

chenzero

#1
Hi,
In programming, from IStoreNameSpace, I can get the folder list,
however, how to get the corresponding filename of a folder?
I know, usually, the corresponding filename is "FolderName.dbx",
but, sometimes, it's not especially for user created folder.

Thanks,
chenzero

 
B

Bruce Hagen

#2
Not sure what you mean by IStoreNameSpace.

Every folder created in Outlook Express has a corresponding dbx file. If you
create a folder named Mail. then there will be a Mail.dbx file in the
message store. If you don't see that, you may be looking in the wrong place.

Tools | Options | Maintenance | Store Folder will reveal the location of
your Outlook Express files. Write the location down and navigate to it in
Windows Explorer or, copy and paste it into Start | Run.

In WinXP, Win2K & Win2K3, the OE user files (DBX and WAB) are by default
marked as hidden. To view these files in Windows Explorer, you must enable
Show Hidden Files and Folders under Start | Control Panel | Folder Options
Icon | View, or in Windows Explorer | Tools | Folder Options | View.

Bruce Hagen
MS-MVP [Mail]
Imperial Beach, CA

"chenzero" <somewhere@earth.solar.com> wrote in message
news:%235pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
> Hi,
> In programming, from IStoreNameSpace, I can get the folder list,
> however, how to get the corresponding filename of a folder?
> I know, usually, the corresponding filename is "FolderName.dbx",
> but, sometimes, it's not especially for user created folder.
>
> Thanks,
> chenzero
>
>


 
R

Ron Sommer

#3
The corresponding filename is always FolderName.dbx .
Folders and sub-folders have a corresponding dbx file.
Ron Sommer

"chenzero" <somewhere@earth.solar.com> wrote in message
news:#5pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
> Hi,
> In programming, from IStoreNameSpace, I can get the folder list,
> however, how to get the corresponding filename of a folder?
> I know, usually, the corresponding filename is "FolderName.dbx",
> but, sometimes, it's not especially for user created folder.
>
> Thanks,
> chenzero
>
>

 
C

chenzero

#4
Hi Bruce,
Thanks for your help !

Sorry, IStoreNameSpace should be IStoreNamespace (little case in s),
http://msdn.microsoft.com/en-us/library/ms710214(VS.85).aspx
it's an interface for program to manipulate OE email.

It seems that there is no method to get the correspoding filename
from folder property(struct FOLDERPROPS) or IStoreFolder interface,

I am sorry that I use a lot of terms in programming.
Thanks again for your kind reply !
chenzero

"Bruce Hagen" <Nospam@mymail.invalid>
:OQnM1xqFKHA.3816@TK2MSFTNGP04.phx.gbl...
> Not sure what you mean by IStoreNameSpace.
>
> Every folder created in Outlook Express has a corresponding dbx file. If
> you create a folder named Mail. then there will be a Mail.dbx file in the
> message store. If you don't see that, you may be looking in the wrong
> place.
>
> Tools | Options | Maintenance | Store Folder will reveal the location of
> your Outlook Express files. Write the location down and navigate to it in
> Windows Explorer or, copy and paste it into Start | Run.
>
> In WinXP, Win2K & Win2K3, the OE user files (DBX and WAB) are by default
> marked as hidden. To view these files in Windows Explorer, you must enable
> Show Hidden Files and Folders under Start | Control Panel | Folder Options
> Icon | View, or in Windows Explorer | Tools | Folder Options | View.
> >
> Bruce Hagen
> MS-MVP [Mail]
> Imperial Beach, CA
>
>
> "chenzero" <somewhere@earth.solar.com> wrote in message
> news:%235pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
>> Hi,
>> In programming, from IStoreNameSpace, I can get the folder list,
>> however, how to get the corresponding filename of a folder?
>> I know, usually, the corresponding filename is "FolderName.dbx",
>> but, sometimes, it's not especially for user created folder.
>>
>> Thanks,
>> chenzero
>>
>>

>


 
C

chenzero

#5
Hi Ron,
Yes, usually, the corresponding filename is FolderName.dbx,
however, I encountered this situation,

user creates a folder named A, sometimes then, user deletes
this folder, (the folder is deleted in OE, but the file will still exist)
at last, user re-creates the folder A again, this time, the corresponding
filename will be like "A(1).dbx" , not "A.dbx" because OE would not
overwrite
the existing file.

I just curious that if can get the corresponding fiile name by an interface
in programming.

Thanks for your reply!
chenzero

"Ron Sommer" <rsommer@nospam.ktis.net>
??????:%23zw%23m9qFKHA.3816@TK2MSFTNGP04.phx.gbl...
> The corresponding filename is always FolderName.dbx .
> Folders and sub-folders have a corresponding dbx file.
> > Ron Sommer
>
> "chenzero" <somewhere@earth.solar.com> wrote in message
> news:#5pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
>> Hi,
>> In programming, from IStoreNameSpace, I can get the folder list,
>> however, how to get the corresponding filename of a folder?
>> I know, usually, the corresponding filename is "FolderName.dbx",
>> but, sometimes, it's not especially for user created folder.
>>
>> Thanks,
>> chenzero
>>
>>


 
V

VanguardLH

#6
chenzero wrote:

> Yes, usually, the corresponding filename is FolderName.dbx, however, I
> encountered this situation,
>
> user creates a folder named A, sometimes then, user deletes this
> folder, (the folder is deleted in OE, but the file will still exist)
> at last, user re-creates the folder A again, this time, the
> corresponding filename will be like "A(1).dbx" , not "A.dbx" because
> OE would not overwrite the existing file.
>
> I just curious that if can get the corresponding fiile name by an
> interface in programming.


From using a hex editor to look at the .dbx files, there is a LocalStore
field whose value has the name of the folder. So, for example,
Mail(1).dbx would have within it LocalStore = "Mail".

In the particular .dbx file in which I looked, the field's name
(LocalStore) started at offset 24C1 and the field's value started at
offset 25C1.

I also found the equivalency values between folder name and file name by
looking in the folders.dbx file using a hex editor.

Someone somewhere might have documentation on the format or structure
within a .dbx file. I found http://oedbx.aroh.de/. You might also want
to hunt around for "msoeapi". I think it is included in the platform
SDK:

www.microsoft.com/msdownload/platformsdk/sdkupdate

Googling around also found:

http://www.vclcomponents.com/Delphi/Samples/OEExplorer-info.html
http://www.plugins-soft.com/demos.html#oeexplorer
 
S

Steve Cochran

#7
You might see if this will give it to you:
http://msdn.microsoft.com/en-us/library/bb931247(VS.85).aspx

Those functions aren't very well documented. It doesn't appear that
IStoreNameSpace or IStoreFolder will give you the actual filename.

steve

"chenzero" <somewhere@earth.solar.com> wrote in message
news:%235pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
> Hi,
> In programming, from IStoreNameSpace, I can get the folder list,
> however, how to get the corresponding filename of a folder?
> I know, usually, the corresponding filename is "FolderName.dbx",
> but, sometimes, it's not especially for user created folder.
>
> Thanks,
> chenzero
>
>


 
C

chenzero

#8
Hi,
Thank for your suggestion and the useful links!
chenzero

"VanguardLH" <V@nguard.LH> ??????:h5ficv$nu9$1@news.albasani.net...
> chenzero wrote:
>
>> Yes, usually, the corresponding filename is FolderName.dbx, however, I
>> encountered this situation,
>>
>> user creates a folder named A, sometimes then, user deletes this
>> folder, (the folder is deleted in OE, but the file will still exist)
>> at last, user re-creates the folder A again, this time, the
>> corresponding filename will be like "A(1).dbx" , not "A.dbx" because
>> OE would not overwrite the existing file.
>>
>> I just curious that if can get the corresponding fiile name by an
>> interface in programming.

>
> From using a hex editor to look at the .dbx files, there is a LocalStore
> field whose value has the name of the folder. So, for example,
> Mail(1).dbx would have within it LocalStore = "Mail".
>
> In the particular .dbx file in which I looked, the field's name
> (LocalStore) started at offset 24C1 and the field's value started at
> offset 25C1.
>
> I also found the equivalency values between folder name and file name by
> looking in the folders.dbx file using a hex editor.
>
> Someone somewhere might have documentation on the format or structure
> within a .dbx file. I found http://oedbx.aroh.de/. You might also want
> to hunt around for "msoeapi". I think it is included in the platform
> SDK:
>
> www.microsoft.com/msdownload/platformsdk/sdkupdate
>
> Googling around also found:
>
> http://www.vclcomponents.com/Delphi/Samples/OEExplorer-info.html
> http://www.plugins-soft.com/demos.html#oeexplorer


 
C

chenzero

#9
Hi,
Thanks you for the useful link!
chenzero

"Steve Cochran" <scochran@oehelp.com> дÈëÏûÏ¢ÐÎÅ:637ADCC3-5C6A-4406-9B89-AA5FD02987AB@microsoft.com...
> You might see if this will give it to you:
> http://msdn.microsoft.com/en-us/library/bb931247(VS.85).aspx
>
> Those functions aren't very well documented. It doesn't appear that
> IStoreNameSpace or IStoreFolder will give you the actual filename.
>
> steve
>
> "chenzero" <somewhere@earth.solar.com> wrote in message
> news:%235pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
>> Hi,
>> In programming, from IStoreNameSpace, I can get the folder list,
>> however, how to get the corresponding filename of a folder?
>> I know, usually, the corresponding filename is "FolderName.dbx",
>> but, sometimes, it's not especially for user created folder.
>>
>> Thanks,
>> chenzero
>>
>>

>
>


 
S

Steve Cochran

#10
Well, you'd still have to know what folder to use the GetFile from. The
easier way would be the following:

Get the Friendly folder name from FolderProps
(IStoreNamespace::GetFolderProps) and then, assuming the most recently used
version of the similarly named files (e.g. inbox.dbx, inbox (1).dbx, inbox
(2).dbx) is the current one, then you could compare the similarly named
files' last modified dates and that would indicate which one was actually
being used. But that's only if the assumption holds true, which it probably
does. Every time a user accesses a folder, the last modified date changes.

Looking at the file dates after getting the Friendly names from the
FolderProps structure would be simpler than trying to find it by other
means, it would seem, as the documentation is so slim.

steve

"chenzero" <somewhere@earth.solar.com> wrote in message
news:ux3NNP2FKHA.3396@TK2MSFTNGP04.phx.gbl...
> Hi,
> Thanks you for the useful link!
> chenzero
>
> "Steve Cochran" <scochran@oehelp.com>
> дÈëÏûÏ¢ÐÎÅ:637ADCC3-5C6A-4406-9B89-AA5FD02987AB@microsoft.com...
>> You might see if this will give it to you:
>> http://msdn.microsoft.com/en-us/library/bb931247(VS.85).aspx
>>
>> Those functions aren't very well documented. It doesn't appear that
>> IStoreNameSpace or IStoreFolder will give you the actual filename.
>>
>> steve
>>
>> "chenzero" <somewhere@earth.solar.com> wrote in message
>> news:%235pP1tqFKHA.1340@TK2MSFTNGP05.phx.gbl...
>>> Hi,
>>> In programming, from IStoreNameSpace, I can get the folder list,
>>> however, how to get the corresponding filename of a folder?
>>> I know, usually, the corresponding filename is "FolderName.dbx",
>>> but, sometimes, it's not especially for user created folder.
>>>
>>> Thanks,
>>> chenzero
>>>
>>>

>>
>>

>
>


 
Status
Not open for further replies.
Top