Solved Copy files from Network to a local folder based on last import (1 Viewer)

Number11

Member
Local time
Today, 13:39
Joined
Jan 29, 2020
Messages
610
Hi so i am looking for a way to automate copying file from a network folder to a local folder, using say a table that logs the last file date copied?

was thinking

FileCopy "some_network_drive\*.txt", "C:\importing\"

but this wouldn't copy the last few days but all in folder so guessing i would need to create some table to store the last file imported and its created date?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:39
Joined
May 7, 2009
Messages
19,293
but this wouldn't copy the last few days but all in folder so guessing i would need to create some table to store the last file imported and its created date?
you are correct.
first save all files to an array before copying them.
next you dlookup() each array filenames against the table record (if you already made copy of them previously).
if the filename is not in the table, you make copy of it and save the filename + folder to the table.
 

Number11

Member
Local time
Today, 13:39
Joined
Jan 29, 2020
Messages
610
you are correct.
first save all files to an array before copying them.
next you dlookup() each array filenames against the table record (if you already made copy of them previously).
if the filename is not in the table, you make copy of it and save the filename + folder to the table.

you are correct.
first save all files to an array before copying them.
next you dlookup() each array filenames against the table record (if you already made copy of them previously).
if the filename is not in the table, you make copy of it and save the filename + folder to the table.
Ok thanks, i am, going to use the robocopy and run from a bat file as think that's much Easy to do thanks anyways
 

Users who are viewing this thread

Top Bottom