473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Hardlinks on NTFS

Hi :)

I'm thinking of letting my program create hardlinks (or symlinks). I
know python allows doing this for ext, reiser and the like, but
apparently not for ntfs systems.
Is there any package out there that lets me create links in a platform
independent way?

bye
wildemar
Sep 17 '06 #1
4 4673
Hi!

Here, a copy of a message send on anither newsgroup (by me).


Summary on hardlink & junction-point.

*** Sorry, this text is in french ; but command & links are good. ***

Synthèse sur les hardlinks et les points de jonction.
- Les hardlinks sont des alias sur des fichiers.
- Les points de jonction sont des alias sur des répertoires.

A) Hardlink

Pour créer des hardlinks, le mieux est d'utiliser fsutil.exe
Tapez fsutil create hardlink [Entrée] pour voir la syntaxe

Fsutil n'est pas fourni avec W2K, mais le fichier de XP fonctionne très
bien.

Pour connaître la liste des hardlinks, il existe hlscan.exe , fourni avec
le Windows-resource-kit

Quelques infos de plus, par l'aide de windows, en cherchant "hardlink"

B) Point de jonction

Un point de jonction permet de considérer un volume, une unité, ou un
répertoire, comme un sous-répertoire. Il s'agit alors d'un alias, avec
répercussion instantanée des modifications.

Dans un DIR, les points de jonction apparaissent avec <JONCTIONà la place
de <REP>

Pour créer un point de jonction, il existe linkd.exe , fourni avec le
Windows-resource-kit
Linkd.exe permet aussi le suppression des points de jonction (mais RD
fonctionne aussi bien)

Pour une aide sur linkd : linkd /? (fallait y penser, hein!)

Un article MS sur les points de jonction :
http://support.microsoft.com/Default.aspx?kbid=205524

Quelques renseignements dans l'aide de windows, à "point jonction"
(glossaire). Chercher aussi "lecteur monté"

Faites de beaux rêves.

Michel Claveau
Sep 17 '06 #2
Méta-MCI wrote:
Here, a copy of a message send on anither newsgroup (by me).

Summary on hardlink & junction-point.
[snip]
http://support.microsoft.com/Default.aspx?kbid=205524
Yeah, I know :). Thanks a lot, anyway. There's also fsutils, which I
thought about using.
Creating the links really isn't a problem, I just don't want to worry
about which platform I'm on.

bye
wildemar
Sep 17 '06 #3
Wildemar Wildenburger <wi******@freakmail.dewrites:
Hi :)

I'm thinking of letting my program create hardlinks (or symlinks). I
know python allows doing this for ext, reiser and the like, but
apparently not for ntfs systems.
Is there any package out there that lets me create links in a platform
independent way?

bye
wildemar
This is my solution:

import os

def CreateHardLink(src, dst):
import ctypes
if not ctypes.windll.kernel32.CreateHardLinkA(dst, src, 0): raise OSError

os.link = CreateHardLink

--
Dieter Deyke
mailto:de***@comcast.net mailto:de***@gmx.net mailto:de***@yahoo.com
Vs lbh pna ernq guvf, lbh unir jnl gbb zhpu gvzr.
Sep 17 '06 #4
Dieter Deyke wrote:
This is my solution:

import os

def CreateHardLink(src, dst):
import ctypes
if not ctypes.windll.kernel32.CreateHardLinkA(dst, src, 0): raise OSError

os.link = CreateHardLink
Cool, thanks. :)

wildemar

Sep 18 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Pål Andreassen | last post by:
Running Windows 2003 Server Framework 1.1 A site is configured to use integrated security (in IIS 6) Windows autentication and user impersonation in web.config <identity impersonate="true" />...
2
by: Jim Richards | last post by:
I have been told by a local PC club technician that 98SE cannot read NTFS drives in a network. Is this true? TIA, Jim.
3
by: Ray Cassick \(Home\) | last post by:
I am starting to think there is some kind of conspiracy :) but everywhere I try to locate some (working) code showing how to change NTFS partitions on a network share I end up at a dead end. I...
1
by: systemonkey | last post by:
I have a lot of huge files on a server and I can't risk getting deleted by anyone. What I have been doing is I create a ftp account for users and create a hardlinks to the original file in case...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.