uznut 0 Posted April 29, 2004 i wanted to know if u can use and inputbox to insert a day like the 24th and then delete like a file like $00 = InputBox("DATA", "Insert the Day of the week", "", "", -1, -1, 0, 0) FileDelete("C:\atmrpt\$00test.txt") the above does not work can some one help me also is there any way to make autoit look at a file and determin the date the file was created if it is a prior bussisness day of the current bussiness day then run something and if it is not then exit Is this possible? Share this post Link to post Share on other sites
scriptkitty 1 Posted April 29, 2004 (edited) Just needed to seperate variables from your text. if $00=04 then in autoit: "C:\atmrpt\" & $00 & "test.txt"="C:\atmrpt\04test.txt" "C:\atmrpt\$00test.txt"="C:\atmrpt\$00test.txt" $00 = InputBox("DATA", "Insert the Day of the week", "", "", -1, -1, 0, 0) FileDelete("C:\atmrpt\" & $00 & "test.txt") edit.. second part from helpfile: FileGetTime -------------------------------------------------------------------------------- Returns the time and date information for a file. FileGetTime ( "filename" [,option]) Parameters filename Filename to check. option [optional] Flag to indicate which timestamp 0 = Modified (default) 1 = Created 2 = Accessed Return Value Success: Returns an array that contains the file time information. See Remarks. Failure: Returns numeric 1 and sets @error to 1. Remarks The array is a single dimension array containing six elements: $array[0] = year (four digits) $array[1] = month (range 01 - 12) $array[2] = day (range 01 - 31) $array[3] = hour (range 00 - 23) $array[4] = min (range 00 - 59) $array[5] = sec (range 00 - 59) Notice that return values are zero-padded. $array=FileGetTime("c:\myfile.txt") if $array[2]<>@mday then dosomething() func dosomething() msgbox(1,"Hi","there") endfunc Edited April 29, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites