Copy a folder from one location to other

Hi All, I am kinda new to relevance and would appreciate some guidance. I am creating a task to
copy a folder from a share drive to another location.Here is a portion of the scripts within the task:

prefetch 90853845aff981c550fbecf85b56dfa161368e3c sha1:90853845aff981c550fbecf85b56dfa161368e3c size:202082592 http://bigfix.company.com:52311/Uploads/90853845aff981c550fbecf85b56dfa161368e3c/MongoDBCompass.tmp.tmp sha256:af4701cae846afefced1fd892a31c8eb7934d82e4f8892a050aa17656b1a5d99
extract 90853845aff981c550fbecf85b56dfa161368e3c
wait __Download\MongoDBCompass.tmp
waithidden cmd /c md C:\Program Files (x86\MongoDBCompass
waithidden cmd /c copy “\shared server\shared folder\MongoDBCompass.tmp” "C:\Program Files (x86\MongoDBCompass"
waithidden cmd /c copy “\shared server\shared folder\BFArchive.exe” "C:\Program Files (x86\MongoDBCompass"
waithidden cmd /c “\shared server\shared folder\BFArchive.exe” -x “\shared server\shared folder\MongoDBCompass.tmp” "C:\Program Files (x86\MongoDBCompass"
delete "C:\Program Files (x86\MongoDBCompass\MongoDBCompass.tmp"
delete “C:\Program Files (x86\MongoDBCompass\BFArchive.exe”

The action fails…
At 13:24:45 -0400 - actionsite (http://bigfix.company.com:52311/cgi-bin/bfgather.exe/actionsite)
Command failed (Thread execution failed (193)) wait __Download\MongoDBCompass.tmp (action:2600364)

Would someone please kindly take a look and let me know what I am missing?

Thanks,
Ram

gothanram,

What are you trying to accomplish with the following line?

wait __Download\MongoDBCompass.tmp

To me, this looks like you want to wait until the file is downloaded before you continue.

Thiswait command is actually trying to run a command/script/application named __Download\MongoDBCompass.tmp, and to wait for it to complete, before continuing on with the rest of the action script.

Also, in some of the subsequent lines, you seem to be missing a close parenthesis after x86

Hopefully this helps,
Bob_K

Thanks for correcting Bob…will let you know the results.

Hey @gothanram,

You need not to use prefetch statement for copying files from shared drive or location.

> folder create C:\Folder

> //++++++++++++++Copy Oracle VM+++++++++++++++
> copy "\\server_location\E\Prt\Docker\VirtualBox-5.1.20-114628-Win.exe" "C:\Folder\VirtualBox-5.1.20-114628-Win.exe"

> //++++++++++++++++Copy Docker+++++++++++++
> copy "\\server_location\E\Prt\Docker\DockerToolbox.exe" "C:\Folder\DockerToolbox.exe"

It will work…!!
Cheers…!!

2 Likes

thanks Prabhu…I believe the above action script is for copying a single file but I am looking for a complete folder with sub-folders in it.

I have the same challenge, does anyone have a statement that has be proven to work. All I’m trying to do is copy a folder from one location to another. Seem simple but has proved to be an exercise in frustration. Help!