Copy File from Network to Local Folder with VBScript Commands

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.
waforbes100Asked:
Who is Participating?
 
MarcjevConnect With a Mentor Commented:
dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "\\home\letters\*.doc", "C:/temp/dir"

'can also be a single file...
0
 
waforbes100Author Commented:
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
 
haroutigCommented:
did you solve your issue? i might have a solution for you
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
waforbes100Author Commented:
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
 
haroutigCommented:
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
 
waforbes100Author Commented:
1. Name of file = Winzip.wmzul
2. Hostname = CSNAS050
3. Sharename = CSNASSAU
0
All Courses

From novice to tech pro — start learning today.