--- In [email protected], "chunwaihome" <[EMAIL PROTECTED]> wrote: > > Hell, I would like to write a script that when a folder has a new > file appear with unknown filename, it will automately copy to a > define path. > > e.g. > file.watchfolder(?"M:\incoming\",file.copy "m:/incoming/" "n:/", > 0 ,"file") > > but there is a error, what a problem about a script > > thx >
Try it this way (save in testwatchfolder.powerpro in your scripts folder) file.watchfolder(?"M:\Incoming\", "[EMAIL PROTECTED](_file_)", 0 ,"file") quit Function DoCopy(filename) local filetocopy=?"M:\Incoming\"++filename file.copy(filetocopy ?"N:\") quit Regards, Sheri
