Sysinternals Homepage
Forum Home Forum Home > Windows Discussions > Internals
  New Posts New Posts RSS Feed - Get File Name
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Get File Name

 Post Reply Post Reply
Author
Message
avirat View Drop Down
Newbie
Newbie


Joined: 30 May 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote avirat Quote  Post ReplyReply Direct Link To This Post Topic: Get File Name
    Posted: 30 May 2008 at 2:52am
Hi Devs,

If we have the LCN (Logical Cluster Number) and is there any way to get the

which file resides on that particular LCN?



Avi
Back to Top
dirbase View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 March 2008
Status: Offline
Points: 497
Post Options Post Options   Thanks (0) Thanks(0)   Quote dirbase Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 8:07am
THis is what I would do:
Download the MS OEM support tools from here.
Extract nfi.exe
Open a command box.
Run the following command
<path to nfi.exe> <letter of the drive where the file resides> <logical sector number>
You'll then get the name of the file.
The logical sector number could be obtained by multipying the LCN by the number of sectors in a cluster (8 if your volume size is greater than 2 GB)
Back to Top
avirat View Drop Down
Newbie
Newbie


Joined: 30 May 2008
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote avirat Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2008 at 9:08pm
thanks for reply..

I want to get the file name programatically..

Is there any native API that do the same thing...
Avi
Back to Top
dirbase View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 March 2008
Status: Offline
Points: 497
Post Options Post Options   Thanks (0) Thanks(0)   Quote dirbase Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 10:38pm
Check out: NtFsControlFile, NtQueryInformationFile also DeviceIoControl

Edited by dirbase - 04 June 2008 at 11:28pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down