Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Script to check filename continuously

RE: Script to check filename continuously

From: Pardee, Roy E <roy.e.pardee_at_lmco.com>
Date: Thu, 03 Jul 2003 07:05:35 -0800
Message-ID: <F001.005C3378.20030703070535@fatcity.com>


Script would be good for this kind of thing, I think. Dig how similar this windows scripting host script is to your pseudocode:

' --------------------------------------------
Dim FSO
Const WatchForFile = "c:\pretend.txt"
Const CopyFileTo = "c:\copied.txt"

   Set FSO = CreateObject("Scripting.FileSystemObject")    Do While True

      If FSO.FileExists(WatchForFile) Then
         WScript.Echo "Found " & WatchForFile & "!  Copying..."
         Call FSO.CopyFile(WatchForFile, CopyFileTo)
         Exit Do
      Else
         WScript.Echo "Still no " & WatchForFile & "--going to sleep for 10
seconds..."
         WScript.Sleep 10000
      End If

   Loop
   Set FSO = Nothing
   WScript.Echo "Finished running " & WScript.ScriptFullName
' --------------------------------------------

Save that off to a text file w/extension .vbs & execute it at the command line by typing

   cscript <<filename>>.vbs.

There's documentation for the windows scripting host at http://www.microsoft.com/scripting.

HTH,
-Roy

Roy Pardee
Programmer/Analyst/DBA
SWFPAC Lockheed Martin IT
Extension 8487

-----Original Message-----

Sent: Thursday, July 03, 2003 3:31 AM
To: Multiple recipients of list ORACLE-L

Hi All

Does anyone have script(DOS batch file or Unix Shell) to do the following stuff?

loop
if exist FILE_NAME

      begin
            do something;
            copy files to remote machine,etc...
            EXIT;
      end;

end loop;

Thanks
Sami

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author:
  INET: Saminathan_Seerangan_at_i2.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Pardee, Roy E
  INET: roy.e.pardee_at_lmco.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jul 03 2003 - 10:05:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US