Jump to content

FileCopy & UNC paths..


Paradox
 Share

Recommended Posts

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


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

Link to comment
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?

Link to comment
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()

Link to comment
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?

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...