Jump-start your project by learning from devs who
write Windows drivers and file systems every day.
Take an OSR seminar!

OSR is Hiring! Click here to find out more.

Upcoming OSR Seminars:
Windows Internals & Software Drivers Lab, Santa Clara, CA 5-9 August, 2013
Kernel Debugging & Crash Analysis for Windows Lab, Santa Clara, CA 9-13 September, 2013
Writing WDF Drivers for Windows Lab, Boston, MA 7-11 October, 2013
Developing File Systems for Windows, Seattle, WA 5-8 November, 2013


Go Back   OSR Online Lists > ntfsd
Welcome, Guest
You must login to post to this list
  Message 1 of 6  
03 Jul 12 13:10
trencan
xxxxxx@centrum.cz
Join Date: 28 Oct 2011
Posts To This List: 41
how to invoke simple rename

Hello, is there any way how can I invoke simple rename from user mode? It is rename when FS filter driver sees RootDirectory = NULL, FileName is only the file name in FILE_RENAME_INFORMATION structure (it is rename of file inside a folder). I tried from cmd line using "rename" and "move" but still I get Fully Qualified Rename with absolute path in FileName of FILE_RENAME_INFORMATION. The same with explorer. Thanks.
  Message 2 of 6  
03 Jul 12 14:31
Petr Kurtin
xxxxxx@avast.com
Join Date: 25 Sep 2008
Posts To This List: 142
RE: how to invoke simple rename

Write your own rename tool that calls NtSetInformationFile API. I think it's quite hard to find an app in user-mode which generates other two rename operations but fully qualified rename. I think either simple rename or relative rename can be simulated with network redirector. Have you read "What's in a name? - Cracking Rename Operations" arcticle in NT Insider? -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@centrum.cz Sent: Tuesday, July 03, 2012 7:09 PM To: Windows File Systems Devs Interest List Subject: [ntfsd] how to invoke simple rename Hello, is there any way how can I invoke simple rename from user mode? It is rename when FS filter driver sees RootDirectory = NULL, FileName is only the file name in FILE_RENAME_INFORMATION structure (it is rename of file inside a folder). I tried from cmd line using "rename" and "move" but still I get Fully Qualified Rename with absolute path in FileName of FILE_RENAME_INFORMATION. The same with explorer. Thanks. --- NTFSD is sponsored by OSR For our schedule of debugging and file system seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 3 of 6  
03 Jul 12 17:41
Ladislav Zezula
xxxxxx@volny.cz
Join Date: 15 Jul 2003
Posts To This List: 1317
RE: how to invoke simple rename

> Write your own rename tool that calls NtSetInformationFile API. I think it's quite hard > to find an app in user-mode which generates other two rename You can also use FileTest for that. Filetest is capable of firing almost every NtSetInformationFile that it out there.
  Message 4 of 6  
04 Jul 12 03:40
trencan
xxxxxx@centrum.cz
Join Date: 28 Oct 2011
Posts To This List: 41
RE: how to invoke simple rename

> You can also use FileTest for that. Filetest is capable of firing almost every NtSetInformationFile that it out there. Ok I used version from osronline and that didn't have NtSetInformationFile. I downloaded new one from another web site and it works fine. And is it possible to invoke also "relative rename" with RootDirectory non NULL via Filetest? It means to open destination folder, get the handle, put it to RootDirectory of FILE_RENAME_INFORMATION and open source file, then call NtSetInformationFile. I tried to open folder and also file in parallel, but as soon as I do 2nd open, first handle is closed by FileTest. 2nd problem is if I put handle value to RootDirectory, then its value is reset back to 0000000000000000 and status is "The entered value has bad format."
  Message 5 of 6  
04 Jul 12 04:13
Ladislav Zezula
xxxxxx@volny.cz
Join Date: 15 Jul 2003
Posts To This List: 1317
RE: how to invoke simple rename

> And is it possible to invoke also "relative rename" with RootDirectory > non NULL via Filetest? It means to open destination folder, get the No, the current version does not support editing the root directory. I'll think of some comfortable way to add it there when I'll have time. L.
  Message 6 of 6  
04 Jul 12 12:54
Ladislav Zezula
xxxxxx@volny.cz
Join Date: 15 Jul 2003
Posts To This List: 1317
RE: how to invoke simple rename

> And is it possible to invoke also "relative rename" with RootDirectory non NULL via Filetest? I made a new build, 2.1.0.345, which is capable of calling relative rename. You edit the "RootDirectory" item (F2 or mouse click) and you enter a directory name. FileTest will open it and put the handle value into the tree item. When you fire the NtSetInformationFile, it will do the relative rename. Get it here: http://www.zezula.net/fstools.html The directory handle itself is closed when you either enter another directory or you exit FileTest. L.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntfsd list to be able to post.

All times are GMT -5. The time now is 14:16.


Copyright ©2012, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license