获取文件属性信息 [英] Getting File Properties info
问题描述
是否有任何API
我的系统文件存储为C:\ TEMP \TEST.DATA。
需要获取确切的名称(如系统中的存储区,包括区分大小写),假设我将文件名传递为c:\ temp \ test.data或处理该文件。
基本上想要检索存储在系统中的文件名,而不是用户指定c:\ temp \ test.data(因为用户可以提供任何格式)。
>
再见
推荐答案
是有任何API
我的系统文件存储为C:\ TEMP \TEST.DATA。
需要获取确切的名称(作为系统中的存储包括区分大小写),假设我将文件名传递为c:\ temp \ test.data或处理该文件。
基本上想要检索存储在系统中的文件名而不是如果用户指定c:\ temp \ test.data(as用户可以提供任何格式)。
再见
Hi,
is there any API for
I have file in system stored as C:\TEMP\TEST.DATA.
Need to get the exact name (as store in system including case sensitive), suppose if i pass file name as c:\temp\test.data or handle to that file.
Basically wanted to retrieve the file name as stored in system rather than if user specifies c:\temp\test.data (as user can give in any format).
Bye
你在Windows上尝试这个吗?
因为Windows 98和以前的版本有这种行为(。我不太确定)
这也仅适用于长度超过8个字符的文件。
Raghuram
R u trying this on windows?
Because windows 98 and previous versions has this behaviour(.i am not very sure about it)
And that too only for files more than 8 characters in length.
Raghuram
我的要求是这样的。
如果用户输入(在UI中)c:\ temp \ test.txt,但是实际上系统存储为c:\ TEMP \TEST.TXT(观察区分大小写)。在这里,我的应用程序备份了这个文件,最终有恢复相同文件的功能。
因此在恢复时,我想创建文件夹c:\ TEMP(区分大小写)和TEST.TXT在那个文件夹中。
在备份统计期间我想使用c:\\\\ TEMP \TEST.TXT(而不是在UI中输入的c:\ temp \ test.txt用户。这里的问题区分大小写,我想提取系统上定义的文件属性)。希望我的要求现在很清楚。
My requirement goes something like this.
if user enters (in UI) c:\temp\test.txt , but actually system storage is as c:\TEMP\TEST.TXT(observe case sensitive). Here my application takes the backup of this file and there is finally facility to restore the same file.
So on restore, i wanted to create folder c:\TEMP(case sensitive) and TEST.TXT in that folder.
SO during backup statge i want to use c:\TEMP\TEST.TXT (rather than c:\temp\test.txt user entered in UI . here issue is case sensitive and i want to extract the file property as defined on the system). Hope my requirement is clear now.
我的要求是这样的。
如果用户输入(在UI)c:\ temp \ test.txt,但实际上系统存储为c:\ TEMP \TEST.TXT(观察区分大小写)。在这里,我的应用程序备份了这个文件,最终有恢复相同文件的功能。
因此在恢复时,我想创建文件夹c:\ TEMP(区分大小写)和TEST.TXT在那个文件夹中。
在备份统计期间我想使用c:\\\\ TEMP \TEST.TXT(而不是在UI中输入的c:\ temp \ test.txt用户。这里的问题区分大小写,我想提取系统上定义的文件属性)。希望我的要求现在很清楚。
My requirement goes something like this.
if user enters (in UI) c:\temp\test.txt , but actually system storage is as c:\TEMP\TEST.TXT(observe case sensitive). Here my application takes the backup of this file and there is finally facility to restore the same file.
So on restore, i wanted to create folder c:\TEMP(case sensitive) and TEST.TXT in that folder.
SO during backup statge i want to use c:\TEMP\TEST.TXT (rather than c:\temp\test.txt user entered in UI . here issue is case sensitive and i want to extract the file property as defined on the system). Hope my requirement is clear now.
我不太确定API可用于此。
在Windows中,文件名不区分大小写....
我不太确定这个API是否存在。
其他成员请评论这个
Raghuram
I am not very sure an API is avialable for this.
In windows the file name is case insensitive....
I am not very sure an API exists for this.
Other members please comment on this
Raghuram
这篇关于获取文件属性信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!