Solved

Copy File from Network to Local Folder with VBScript Commands

Posted on 2008-09-29
6
3,337 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
  • 3
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
Marcjev earned 500 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
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.

 

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

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

Suggested Solutions

Title # Comments Views Activity
mapBully challenge 6 113
C# Error - Add Failed 12 78
c++ reading data from file into two dimensional array 3 93
Rubik's Cube Code for Effective Presentation 3 40
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

930 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

12 Experts available now in Live!

Get 1:1 Help Now