Sign in to follow this  
Followers 0
uznut

Copying A File From Network

5 posts in this topic

i am trying to copy a file across a network but i can only use the computer name.

\\C02022\atmrpts thats what i type in the adress bar to get to that folder. but i put it in a script and it doesn't give me an error it just doesn't copy the files. :D

Share this post


Link to post
Share on other sites



filecopy("\\C02022\atmrpts\tr24012.zip", "c:\tr24012.zip")

Share this post


Link to post
Share on other sites

Try this:

$check=$check=FileExists("\\computer\sharename\file.exe")
If $check=1 Then
    filecopy("\\computer\sharename\file.exe","C:\file.exe",1)
    $check=FileExists("C:\file.exe")
    If $check=1 Then
  msgbox(0,"","Copy successful")
    Else
  msgbox(0,"","Copy Unsucessful")
    Endif
EndIf

Triton

Share this post


Link to post
Share on other sites

nope it still didn't work :D

Share this post


Link to post
Share on other sites

Perhapse just to get it going you could do the dos way

runwait(@comspec & ' /c copy "\\C02022\atmrpts\tr24012.zip" c:\tr24012.zip','',@sw_hide)

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0