VB to create .lnk files

G

Guest

Is there any way you can have VB create .lnk files (shortcut files) on a
user's desktop or a network folder?

This sounds like a wild question, but let me elaborate...

We decided to 'clean up' our network drives. I obtained lists of
paths/files/owners/acess dates from our NetOps group and loaded them into a
database. I had each file 'owner' go in and determine if they needed to
archive, delete or move the file they owned. If they decided to 'move' the
file, they had to provide a new path.

Now that we have evaluated all of the files, we are getting ready to move
them. I'd like to know if there's a way I can write something that will put
a 'link' file (.lnk) into the OLD directory for each file that then points to
the NEW directory. That way, if they look for a file and can't find it in
the old directory, the link will take them to the new directory and they can
'learn' where the files went.

My fallback is to create .txt files for each 'old' folder that lists what
files were present and where they went, but that's time consuming at best.
The most ideal method would be to write something that creates the .lnk file
for me.

I know we've got a ton of geniuses out there...any ideas?

Thanks guys!
 
6

'69 Camaro

Hi, Robert.
...any ideas?

It's probably easier to create NTFS junction points to point from the old
directories to the new directories, instead of creating individual shortcuts
for each file in each of the moved directories. For more information,
please see the following Web pages:

http://en.wikipedia.org/wiki/NTFS_junction_point

http://support.microsoft.com/kb/205524/en-us

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blog: http://DataDevilDog.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
G

Guest

Gunny,

I initially thought about that, but our NOS group doesn't want to do that
(and of course they won't provide a 'why', just that they don't).
 
6

'69 Camaro

Hi, Robert.
(and of course they won't provide a 'why', just that they don't).

If it's not set up correctly to prevent deletion of the junction points
through Windows Explorer or the DOS shell, someone could accidentally delete
the junction point without the proper tool, inadvertently deleting all the
subdirectories and files in the directory that the junction point points to.
My guess is that they're afraid of that happening . . . again. ;-)

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blog: http://DataDevilDog.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top