Solved

Send file to nerwork by way of shortcut

Posted on 2002-04-02
7
131 Views
Last Modified: 2012-05-05
I'm working on a program and I need
to send across a network
I want to do this by the simplest way
I though I could make a short cut to a folder on the network
and send the file to the short cut but that doesnt seem to work
any Ideas on how to send to a shortcut ?
or sending across the network if all else fales LOL

was trying to use filecopy sorce, desanation
0
Comment
Question by:TechJD
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 22

Accepted Solution

by:
rspahitz earned 200 total points
ID: 6913970
Use the UNC.  i.e. use the fully-qualified path across the network, such as \\othercomputer\computersharedfolder\datasource\jdfolder\filetocreate.txt
0
 
LVL 1

Expert Comment

by:S2
ID: 6913971
I don't know if you can copy to a shortcut but use file copy like this:

Filecopy "c:\testfile.txt","\\NetComputer\Sharedfolder\testfile.txt"

works for me fine!

S2
0
 
LVL 1

Author Comment

by:TechJD
ID: 6914151
ok tested and both are right partly
Filecopy "c:\testfile.txt","\\NetComputer\Sharedfolder\testfile.txt"
works
had to change to
Filecopy "c:\testfile.txt","\\NetComputer\c\Sharedfolder\testfile.txt" (added \c - drive)
but only works of drive is maped
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:bobbit31
ID: 6914211
to map the drive programmatically:

Dim wsh As New IWshNetwork_Class

wsh.MapNetworkDrive "Z:", "\\tjhdev\TomcatHome"

'' do your filecopy

wsh.RemoveNetworkDrive "Z:"

make sure to reference Windows Script Host
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6914217
though, it works for me even if i don't have the drive mapped
0
 
LVL 1

Author Comment

by:TechJD
ID: 6914457
ok you guys ever feel like a total idot :)
well I do as of now
I had the right Idea wrong application of it LOL
I have to give the points to  rspahitz  as he did answer first
and of course he gets an A
I built a string and didnt check all of my array LOL
cause second error which I said it didnt work then LOL
sorry guys
thanks for the help
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6914539
We've all been there!
I'm glad it was that easy...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now