Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

VB to create .lnk files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert_L_Ross - 01 Mar 2007 17:08 GMT
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!
Douglas J. Steele - 01 Mar 2007 17:17 GMT
Take a look at my March, 2004 "Access Answers" column in Pinnacle
Publication's "Smart Access".

You can download the column (and sample database) for free at
http://www.accessmvp.com/djsteele/SmartAccess.html

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Is there any way you can have VB create .lnk files (shortcut files) on a
> user's desktop or a network folder?
[quoted text clipped - 28 lines]
>
> Thanks guys!
'69 Camaro - 01 Mar 2007 20:02 GMT
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.

> Is there any way you can have VB create .lnk files (shortcut files) on a
> user's desktop or a network folder?
[quoted text clipped - 28 lines]
>
> Thanks guys!
Robert_L_Ross - 02 Mar 2007 22:53 GMT
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).

> Hi, Robert.
>
[quoted text clipped - 50 lines]
> >
> > Thanks guys!
'69 Camaro - 02 Mar 2007 23:39 GMT
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.

> Gunny,
>
[quoted text clipped - 66 lines]
>> >
>> > Thanks guys!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.