Creating a cd hard link via batch script

Discussion in 'Ask DACS' started by JohnDB36, Dec 29, 2011.

  1. JohnDB36

    JohnDB36 New Member

    Joined:
    Dec 29, 2011
    Messages:
    1
    Likes Received:
    0
    Hi!

    I am new to this forum.

    I have been looking for some technical information on how to create a hard link at CD startup. That way, the user can only see the files within a linked folder. The source as CDFS file volume would be blank to begin with, while the user can only view the files on a linked volume CD.

    Any questions?

    It will be great if I can do it in Windows 7, as well as in Mac OS X.

    Can anybody instruct me how to do this?
     
  2. sfowler073

    sfowler073 New Member

    Joined:
    Jan 10, 2012
    Messages:
    2
    Likes Received:
    0
    On Windows 7:
    A Hard Link requires the link and the target to both reside in an NTFS file system. This does not work for a CDROM.
    A soft link (junction) requires the link to be in an NTFS file system, but the target can reside on a CDROM.
    It gets tricky if the CDROM is not mounted. Assuming the CDROM is drive D: and the CDROM is mounted...

    cd /D C:\Users\myuser

    mklink /J mylink D:\targetdir
    Junction created for mylink <<===>> D:\targetdir

    C:\Users\myuser>dir

    Directory of C:\Users\myuser

    01/10/2012 10:11 AM <DIR> .
    01/10/2012 10:11 AM <DIR> ..
    01/10/2012 10:11 AM <JUNCTION> mylink [D:\targetdir]

    C:\Users\myuser>cd mylink

    C:\Users\myuser\mylink>dir

    Directory of C:\Users\SFowler\mylink

    03/03/2008 09:53 AM <DIR> .
    12/19/2007 01:04 PM <DIR> ..
    02/18/2008 08:09 AM 746,864 myfile_on_cdrom

    FYI: I cannot help you on a MAC.... I have Unix and Windows as background.
     
  3. sfowler073

    sfowler073 New Member

    Joined:
    Jan 10, 2012
    Messages:
    2
    Likes Received:
    0
    A Hard Link points to another structure in the same file system. Therefore, it would not make sense to connect from a disk based file system to a CDROM file system.
     

Share This Page