Every day I need to 'move' a file that has a different name each day but always starts with atm. I'm having a hard time using the wildcard in the move command. One day the file will be atm3152 and the next day it might be atm5487. I would appreciate any ideas...the whole thing works if i put the entire file name in.
MOVE "C:\test\atm*.* " "C:\test\test"
$File = "C:\test\test" $DLine = '' $Rline = '12' $TempFile = + ".TMP" $LineNum = 0
$Rcode = OPEN (1, $File, 2) DEL $TempFile $Rcode = OPEN (2, $TempFile, 5)
$Line = READLINE(1) WHILE @Error = 0
$LineNum = $LineNum + 1 IF $Line = $DLine $Rcode = WRITELINE(2, $RLine + Chr(13) + Chr(10)) ELSE $Rcode = WRITELINE(2, $Line + Chr(13) + Chr(10)) ENDIF $Line = READLINE(1) LOOP $Rcode = CLOSE(1) $Rcode = CLOSE(2) COPY $TempFile $File DEL $TempFile
|