If you copy all of them to the same location it is a simple as FileMoveEx with *.* file mask or using SyncLocalDir and then FileDeleteEx. If you copy them to different locations then you would need to hard-code file names and locations or put this info into .INI or some other config file and then dynamically read file names and locations from that file processing appropriate files in a loop. Here is a simple example for hard-coded names ///////////////// Dim( counter, number ) FileMoveEx( "c:\\source_dir\\file1.csv", "x:\\target_dir1", counter ) FileMoveEx( "c:\\source_dir\\file2.csv", "x:\\target_dir2", counter ) .... FileMoveEx( "c:\\source_dir\\file12.csv", "x:\\target_dir12", counter ) //////////////// Or you coud simple create a batch file like below and then schedule it as a job ///////////////// move /Y c:\source_dir\file1.csv, x:\target_dir1 ... move /Y c:\source_dir\file12.csv, x:\target_dir12 //////////////// : Hi, : I have another question on Syntax. I have 12 files I need to have copied to : another directory. These files sometimes exists and sometimes they do not. : I need to have a job do the following. : 1) Check if a specific file exists in a directory. If it doesnt move on to : the next file until the end. : 2) If the file exists copy it to a specific location (i know how to do this) : 3) Delete the file. Move to the next file until the end. : Thanks for your help.
|