/build/static/layout/Breadcrumb_cap_w.png

How to copy a file in k1000

we have created a script to copy a file .exe from a server over to a c: root directory device. It will make a directory using MD C:\name but it will not copy over the specified file example 
copy" \\server\folder\file name.exe" c:\folder name
any ideas. we have a similair set up for another software process and it works fine?

0 Comments   [ + ] Show comments

Answers (3)

Posted by: rockhead44 7 years ago
Red Belt
0
Make sure you have the destination path in quotes like:

copy "\\server\folder\file name.exe" "c:\folder name"
Posted by: chucksteel 7 years ago
Red Belt
0
If the script is running in the default system context then it will not have access to network shares unless that share has been given access to the computer account (which is not typical). Unless the file being copied is dynamic I would recommend uploading it as a script dependency and copying it from the dependency folder.
Posted by: JasonEgg 7 years ago
Red Belt
0
If all you need is to copy a file, I would suggest using "File Sync" (Distribution > File Synchronization) rather than scripting.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ