• We should now be fully online following an overnight outage. Apologies for any inconvenience, we do not expect there to be any further issues.

'True virtual files'- How to make a shortcut act as a file? (win98-2000?)

supernancy

Senior member
Dec 20, 1999
233
0
0


Here's an idea I have, and I wonder if it can be done in windows. (98, NT, 2k, etc.)

In Linux, you can set up symbolic links. These are like hardcore shortcuts that act like the files that they represent.
I would love to put multiple mp3 files in specific folders for catagorization-but copying gigs of mp3s tends to add unneccessary space to the HDD.
This way, I will be able to put song in a root directory, and then put the shortcut into other folders that it would fall under- /get-up, /trance, /funk etc. When it comes time to burn a CD, i can easily just burn a folder of shortcuts that is essentially looking to the root files.

Programs like Apache server allow for virtual directories, and Windows Networking allows for Virtual Drives- but what about Windows supporting the idea of Virtual files?

I'd like to set up shortcuts (or a modified shortcut) so that the shortcut can be moved, read for a cd burn, played, etc- but it reads the information from the real file.

Any ideas?

 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
You can create shortcuts to specific files, no problem. Just hold down CTRL+SHIFT while you drag to the place where you want the shortcuts to be located. You can then play directly from those. Win9x/2K allows for relatively basic shortcut manipulation, and will not allow you to operate directly on the file that the shortcut points to....ie you won't be able to burn those files.

Win2K's handling of shortcuts is a little different from Win9x, and may allow you to operate through the shortcut....sometimes it works, sometimes it doesn't.
 

supernancy

Senior member
Dec 20, 1999
233
0
0
Hrm. thanks for the comment.. but..

I was hoping to get some NT, 2k people in here to answer this. I am sure that there is some kind of way.
Maybe I can make virtual directories on my HDD, and put files in those.
 

StuckMojo

Golden Member
Oct 28, 1999
1,069
1
76

O....M.....G!!!!

i actually know something that andy hui doesnt!!!!! holy crap. im amazed.

you can do what you want in win2k. NTFS 5 supports hard links. man ln in linux to see the difference between a hard and soft link....basically, a hard link is another name for a file, indistinguisable from the file. like 2 copies, but doenst take up the space.

anyway, there is no &quot;support&quot; (ie command) in win2k to make them, but here is source code, from the article in MSDN that i read about it, that i tweaked to act like the &quot;ln&quot; command in linux. be aware you CANNOT span disks or partitions with hard links.

this is VC++ source. if you compile in something else, you could remove the &quot;stdafx.h&quot; i believe.

-----------

// ln.cpp : Defines the entry point for the console application.
//

#include &quot;stdafx.h&quot;
#define STRICT
#define _WIN32_WINNT 0x0500
#include <windows.h>

int main(int argc, char* argv[])
{
if (argc != 3)
{
printf(&quot;ln: creates a hard link to an existing file.\n&quot;
&quot;usage: ln filename linkname&quot;, argv[0]);
return(0);
}

if (!CreateHardLink(argv[2], argv[1], NULL))
{
printf(&quot;The FileLink couldn't be created.\n&quot;);
}
return(0);
}
 

supernancy

Senior member
Dec 20, 1999
233
0
0
YEAHHH! Thats mah man!

I knew it was possible!
Rock on!

thanks man. Now on to installing win2k woes. :)
 

StuckMojo

Golden Member
Oct 28, 1999
1,069
1
76
not only just in NTFS, but just in NTFS 5 (ie, win2k)

they added hard links, and multiple streams in a file

lemme see if i can find a URL for the MSDN magazine article...ah, yes, here we go:

http://msdn.microsoft.com/msdn-online/start/features/ntfs5.asp

this is actually a pretty interesting article! i may just break down and buy a subscription to MSDN magazine at home...its like 25 bucks w/ professional discount.

ps Andy :p ehhehe
 

StuckMojo

Golden Member
Oct 28, 1999
1,069
1
76
BTW, if i recall correctly, there is no way in win2k to tell how many links you have to a file, and the file size calcs my lie too, if you have multiple links to a file

check the article.

edit: the point being, you could easily confuse yourself with this, so take care :p
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
Multiple streams in a file has always existed with NTFS, and is not a new feature to NTFS5.
 

StuckMojo

Golden Member
Oct 28, 1999
1,069
1
76
&quot;Since their advent with Windows 3.1, NTFS volumes also have another, often underestimated feature: They support multiple streams of data into a single file. With Windows 2000, the stream support has been reinforced, and other rather handy features have been added to help you work seamlessly with files. Let's look at the major features of NTFS 2000, the version of NTFS that comes with Windows 2000.&quot;

sheesh andy...couldn't you have let me bask in the glory for a few more minutes? :p

i was mislead by the title of the article and had missed that tidbit quoted above