Solved

Send file to nerwork by way of shortcut

Posted on 2002-04-02
7
132 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 54
JSON Response and request in VB6 application 11 422
VB6 Compile Compatibility Issue 4 102
Error with a code discussed on this page 5 14
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

777 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