Jump to content

Why is Filecopy not working?


deef99
 Share

Recommended Posts

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

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

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

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...