Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3372
  • Last Modified:

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.
0
waforbes100
Asked:
waforbes100
  • 3
  • 2
1 Solution
 
MarcjevCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now