Re: NTFS reparse points

2005-11-04 Thread Roger Upole
You should be able to use win32file.DeviceIoControl with
winioctlcon.FSCTL_SET_REPARSE_POINT to do this.
(winioctlcon was added in build 205)
The hard part is going to be constructing the
REPARSE_GUID_DATA_BUFFER struct to pass in
as the buffer.

   hth
   Roger

"Stanislaw Findeisen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL 
PROTECTED]
>I want to create a reparse point on NTFS (any).
>
> Here 
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/reparse_points.asp)
>  I read: "reparse points 
> are used to implement NTFS file system links". Here 
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/hard_links_and_junctions.asp)
>  I read: "Soft links 
> are implemented through reparse points".
>
> However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file / 
> directory shortcuts I create. In fact the only 
> attribute set in shortcuts created using Windows Explorer is 
> FILE_ATTRIBUTE_ARCHIVE. (I am using GetFileAttributes() to 
> examine this.)
>
> The questions are:
>
> (1) Why is that so?
> (2) Does anybody have any idea (sample code?) on how to create a reparse 
> point (the simpler, the better) using Python?
>
> I am using Windows 2000 Professional, Python 2.4 and Mark Hammond's Python 
> for Windows Extensions build 204.
>
> Thank you.
>
> +---+
> | When replying, please replace "my_initials" in the|
> | From: address field with my initials - that is, "SF". |
> +---+
>
> -- 
> http://www.nglogic.com
> Enter through the narrow gate! (Mt 7:13-14) 



== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ 
Newsgroups
= East and West-Coast Server Farms - Total Privacy via Encryption =
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NTFS reparse points

2005-11-03 Thread Tony Nelson
In article <[EMAIL PROTECTED]>,
 Stanislaw Findeisen <[EMAIL PROTECTED]> wrote:
 ...
> However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file / 
> directory shortcuts I create. In fact the only attribute set in 
> shortcuts created using Windows Explorer is FILE_ATTRIBUTE_ARCHIVE. (I 
> am using GetFileAttributes() to examine this.)
 ...

Shortcuts are files with a .lnk extention.  Reparse points are NTFS 
directory data.

TonyN.:'[EMAIL PROTECTED]
  '  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NTFS reparse points

2005-11-03 Thread Roel Schroeven
Stanislaw Findeisen wrote:
> I want to create a reparse point on NTFS (any).
> 
> Here
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/reparse_points.asp)
> I read: "reparse points are used to implement NTFS file system links".
> Here
> (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/hard_links_and_junctions.asp)
> I read: "Soft links are implemented through reparse points".
> 
> However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file /
> directory shortcuts I create. In fact the only attribute set in
> shortcuts created using Windows Explorer is FILE_ATTRIBUTE_ARCHIVE. (I
> am using GetFileAttributes() to examine this.)
> 
> The questions are:
> 
> (1) Why is that so?

Because shortcuts aren't reparse points. They're just small files that
contain some information about the file or directory they point to and
how to open it.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: NTFS reparse points

2005-11-03 Thread Duncan Booth
Stanislaw Findeisen wrote:

> (2) Does anybody have any idea (sample code?) on how to create a reparse 
> point (the simpler, the better) using Python?
> 

The only sample code I've seen for creating reparse points is in c or c++ 
and its quite a messy operation. See 
http://www.sysinternals.com/Utilities/Junction.html for some sample code.

The easy way to do it from Python is just to make sure you have a program 
such as junction on your system then use os.system('junction "%s" "%s"' % 
(directory, target))

Be careful if you start creating junctions: Windows explorer doesn't 
understand them: if you try to delete a folder which is actually a junction 
it first deletes all the files inside the folder so the original folder 
ends up empty as well.
-- 
http://mail.python.org/mailman/listinfo/python-list


NTFS reparse points

2005-11-03 Thread Stanislaw Findeisen
I want to create a reparse point on NTFS (any).

Here 
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/reparse_points.asp)
 
I read: "reparse points are used to implement NTFS file system links". 
Here 
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/hard_links_and_junctions.asp)
 
I read: "Soft links are implemented through reparse points".

However I can't see FILE_ATTRIBUTE_REPARSE_POINT turned on in any file / 
directory shortcuts I create. In fact the only attribute set in 
shortcuts created using Windows Explorer is FILE_ATTRIBUTE_ARCHIVE. (I 
am using GetFileAttributes() to examine this.)

The questions are:

(1) Why is that so?
(2) Does anybody have any idea (sample code?) on how to create a reparse 
point (the simpler, the better) using Python?

I am using Windows 2000 Professional, Python 2.4 and Mark Hammond's 
Python for Windows Extensions build 204.

Thank you.

+---+
| When replying, please replace "my_initials" in the|
| From: address field with my initials - that is, "SF". |
+---+

-- 
 http://www.nglogic.com
 Enter through the narrow gate! (Mt 7:13-14)
-- 
http://mail.python.org/mailman/listinfo/python-list