ghostdog74 , how can i attch your code and put it in my code ??
i could not be able to add what u wrote in my code !!
this is my code and in red is what you wrote :
@ECHO OFF
CLS
:START
IF "%1" == "" S:\AISHA\MSG *.TXT /* SEARCH FOR TEXT FILE ONLY
GOTO SER_DATE
SER_DATE
REM COMPARE DATE MODIFIED WITH CURRENT DATE IF SYS<=15 MIN THEN GOTO COPY_FILE
[color=red]Set objFS = CreateObject("Scripting.FileSystemObject")
strFolder = "C:\test"
dstFolder = "c:\destination"
Set objFolder = objFSO.GetFolder(strFolder)
For Each strFiles In objFolder.Files
If DateDiff("n",strFiles.DateLastModified,Now) > 15 Then
WScript.Echo strFiles.Name
objFS.MoveFile strFiles.Name, dstFolder & "\" & strFiles.Name
End If
Next[/color]
GOTO COPY_FILE
REM COPY FROM S:\MSG.TXT TO C:\IN
COPY_FILE
IF "%1" == "" XCOPY S:\HII\MSG.TXT
IF NOT "%1" == "" XCOPY S:\%1
ECHO.
C:\IN
GOTO SLP
REM Execute the MS-DOS dir command ever 60 MIN.
SLP
SLEEP 60
GOTO START
thanks in advance ....