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

x
?
Solved

Copy File from Network to Local Folder with VBScript Commands

Posted on 2008-09-29
6
Medium Priority
?
3,362 Views
Last Modified: 2013-11-10
I need a VBScript to execute the following:
copy \\servername\share\filename.ext "C:\Documents and Settings\All Users\Application Data\App-name"

No DOS -type command works.
0
Comment
Question by:waforbes100
[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
  • 3
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
Marcjev earned 1500 total points
ID: 22600027
dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "\\home\letters\*.doc", "C:/temp/dir"

'can also be a single file...
0
 

Author Comment

by:waforbes100
ID: 22602101
Marcjev, you understand what I need. However, I just got a "permission denied" error (see attached JPEG) - even though I am the Domain Admin, AND I can manually copy the file from source to destination (see the exact script code in attached text file).

VBScript-Copy-Error.JPG
VBScript-Copy-Script.txt
0
 
LVL 1

Expert Comment

by:haroutig
ID: 23058580
did you solve your issue? i might have a solution for you
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:waforbes100
ID: 23064577
Haroutig, I have NOT resolved by issue: I would be delighted to see what other available solutions you have! I'm most grateful that you have been looking into something further: I am eager to test it out.
0
 
LVL 1

Expert Comment

by:haroutig
ID: 23064843
ok give me the following infos, and your script will be ready within minutes:

the name of the file or files you want to copy
whats the hostname and sharename?
the username and password to access that share

thanks and welcome
0
 

Author Comment

by:waforbes100
ID: 23752695
1. Name of file = Winzip.wmzul
2. Hostname = CSNAS050
3. Sharename = CSNASSAU
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

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.
In this post we will learn different types of Android Layout and some basics of an Android App.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes

722 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