Sign in to follow this  
Followers 0
deef99

Why is Filecopy not working?

3 posts in this topic

I am at my WITS END! It does not copy the file. Why will this not work? What do I have wrong? Please help...I can't leave until this is running!

#include "array.au3"

#Include "File.au3"

$file = ""

$dest = "\\ardfiles01\common\CallCenter_downloads\fff.csv"

;look for first occurance of a file

$search = FileFindFirstFile("\\ardfilesxx\common\x_downloads\tfn_turndown\*.csv")

While 1

;look for additional files

$file = FileFindNextFile($search)

MsgBox(0,"file",$file & $dest)

FileCopy($file,$dest,1)

If @error Then ExitLoop

WEnd

Share this post


Link to post
Share on other sites



I am at my WITS END! It does not copy the file. Why will this not work? What do I have wrong? Please help...I can't leave until this is running!

#include "array.au3"

#Include "File.au3"

$file = ""

$dest = "\\ardfiles01\common\CallCenter_downloads\fff.csv"

;look for first occurance of a file

$search = FileFindFirstFile("\\ardfilesxx\common\x_downloads\tfn_turndown\*.csv")

While 1

;look for additional files

$file = FileFindNextFile($search)

MsgBox(0,"file",$file & $dest)

FileCopy($file,$dest,1)

If @error Then ExitLoop

WEnd

Hi,

$file = FileFindNextFile($search) give as return a filename. You need the fullpath.

FileCopy ("\\ardfilesxx\common\x_downloads\tfn_turndown\" & $file, $dest,1)

should work.

;-))

Stefan

Share this post


Link to post
Share on other sites

DUH! Sometimes you can't see the forest for the trees! Thank you SO MUCH!

Hi,

$file = FileFindNextFile($search) give as return a filename. You need the fullpath.

FileCopy ("\\ardfilesxx\common\x_downloads\tfn_turndown\" & $file, $dest,1)

should work.

;-))

Stefan

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