The problem is not with a variable, but with the value of that variable. Please run your code in the debugger and make sure the final name of the file to be moved is correct Anyway, here is the simplified version of your code that you may want to use // vars Dim(process, number) // main RunAndWait("c:\\inpro_share\\inpro\code\\micrographics.bat", "", 0, process) FileMove("s:\\inpro\\input\\micrographics\\agreements.txt", & "s:\\inpro\\input\\micrographics\\archive\\@T"mmddyyyy".txt") : I have the code below : // vars : Dim process, number : Dim this_day, date : Dim filename String : // main : Today(this_day) : format(this_day, "mmddyyyy", filename) : Concat( this_day, ".txt", filename ) : RunAndWait("c:\\inpro_share\\inpro\code\\micrographics.bat", : "", 0, process) : // add full path : Concat( "s:\\inpro\\input\\micrographics\\archive\\", filename, : filename ) : FileMove("s:\\inpro\\input\\micrographics\\agreements.txt", : filename) : It falls over trying to move the file - I want the file to be renamed to : todays date.txt and put in my archive folder - I don;t think FileMove : likes variable names. : How can I achieve this ? : Thanks.
|