Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send file to nerwork by way of shortcut

Posted on 2002-04-02
7
Medium Priority
?
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 22

Accepted Solution

by:
rspahitz earned 800 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

704 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