Sign in to follow this  
Followers 0
Paradox

FileCopy & UNC paths..

7 posts in this topic

Real quick... would something like this work?

filecopy("\\server1\dir1\dir2\filename.ext", "\\localpath\")

have a database sync application I'm working on... thanks guys!

Share this post


Link to post
Share on other sites



Real quick... would something like this work?

filecopy("\\server1\dir1\dir2\filename.ext", "\\localpath\")

have a database sync application I'm working on... thanks guys!

Should do providing you have proper rights to server folder


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Here's a decent question...

Since I'll be doing network transfers with this script I'm working on, it could take a long time for the file to transfer (may wind up being about 700mb - 1gb a night). Will AutoIt filecopy() command wait until the file is completely transferred before the next line in the script is processed??

If not, is there I can make it wait?

Share this post


Link to post
Share on other sites

Here's a decent question...

Since I'll be doing network transfers with this script I'm working on, it could take a long time for the file to transfer (may wind up being about 700mb - 1gb a night). Will AutoIt filecopy() command wait until the file is completely transferred before the next line in the script is processed??

If not, is there I can make it wait?

I don't know about filecopy(), but try the RunWait() along with XCOPY. It works well.

RunWait("xcopy \\server\path\*.something1 /z /y /e /d C:\temp", "C:\")
RunWait("xcopy \\server\path\*.something2 /z /y /e /d C:\temp", "C:\")

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Here's a decent question...

Since I'll be doing network transfers with this script I'm working on, it could take a long time for the file to transfer (may wind up being about 700mb - 1gb a night). Will AutoIt filecopy() command wait until the file is completely transferred before the next line in the script is processed??

If not, is there I can make it wait?

try this:

filecopy("\\server1\dir1\dir2\filename.ext", "\\localpath\")
while  1
sleep(10)
 if  filegetsize("\\server1\dir1\dir2\filename.ext")= filegetsize("\\localpath\dir1\dir2\filename.ext") then
   Exitloop
  Endif
wend
Edited by blademonkey

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

even easier... (thanks Flaxcrack for the suggestion)

runwait("copy " & $file2transfer & " " & @ScriptFullPath)

Share this post


Link to post
Share on other sites

even easier... (thanks Flaxcrack for the suggestion)

runwait("copy " & $file2transfer & " " & @ScriptFullPath)

:lmao: Glad I could help!

[quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()

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