Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Shortcut instead of filecopy 1

Status
Not open for further replies.

Bubbler

IS-IT--Management
Dec 14, 2003
135
US
I know this is possible using ShellLink but there must be something better, instead of FileCopy as shown in the example below, is it possible to CreateShortCut so to speak?

If Data.GetFormat(vbCFFiles) Then
Dim F As Variant
For Each F In Data.Files
Dim S As String, N As Long
N = UBound(arrFile) + 1
ReDim Preserve arrFile(N)
S = Dir$(F)
arrFile(N) = S
FileCopy F, List1.Tag & arrFile(N)
N = InStrRev(S, ".")
If N Then S = Left$(S, N - 1)
List1.AddItem S
Next
End If
 

Search MS for "Hardlink" or "Hard Link" (forget which).

Good Luck

 
Found it, (HardLink) once again vb5 you da man, one more quick question, related to this, with a ListBox and a TextBox, how in the drag & drop function of the list box:
Private Sub List1_OLEDragDrop(Data As ..... and so on

if a file is dragged and dropped to the list box, Text 1 shows the path to that file. Make sense? [glasses]
 
Once again vb5prgrmr you hae helped me! Wish I could give you 2 stars. If you are ever in Las Vegas, I will buy you a cold one [thumbsup2]
 
(I was talking about the original file btw)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top