Command Prompt: Repeat del command continuosly


  1. Posts : 3
    Windows 7 Professional x64
       #1

    Command Prompt: Repeat del command continuosly


    Hi All,

    I'm running a program that parses .csv files and then changes them into ._OK files. This process takes longer when there are a large number of *.OK files in the folder where the files being converted are located. To remedy this I occasionally manually run this command:

    Code:
    del *._OK
    While pointing at the proper folder.

    Is there a way to have this command continuously run, kind of like out ping -t [IP ADDRESS HERE] continuously pings a certain IP address?

    Regards,

    Dan
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    I'm running a program that parses .csv files and then changes them into ._OK files.
    I take it then the conversion program will not accept an output folder other than the current or working directory? More detail what you actually do with the output files might be helpful.
      My Computer


  3. Posts : 3
    Windows 7 Professional x64
    Thread Starter
       #3

    Basically it takes the .csv files, parses them, passes the information held within to a database, and at the end converts the file to an ._OK. I'm not really that knowledgeable as to how it all works, I just set up the utility and run it when I get a large volume of .csv files to bring into the server. The conversion program needs the folder to be one called "DATA" located on my C: drive.
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    Call the utility from a batch file and make the del *._OK the last command in the batch file.
    It should run when the utility exits.
      My Computer


  5. Posts : 10,485
    W7 Pro SP1 64bit
       #5

    nickelcap said:
    Is there a way to have this command continuously run
    Code:
    :start
    timeout /T 10
    del *._OK
    goto start
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    Sure, make it a batch file and place a link to it in the Startup folder. Then it will start when the system boots and run until it shuts down. You could also place a link to it on the Desktop then start if manually whenever you want it to start running.

    It's going to open a Command Prompt window, not much you can do about that other than minimize it.

    Every 10 seconds seems excessive but I guess it depends on how often the _OK files are being generated.
      My Computer


  7. Posts : 3
    Windows 7 Professional x64
    Thread Starter
       #7

    Thank you very much! I put the .bat file in the DATA folder and will manually run it as needed. It works just how I hoped it would. 10 sec is a good pace for what I'm doing since the conversion of files from .csv to ._OK files only takes the utility a few second, and a large build up of ._OK files forms very quickly which slows the application down. With this I'll be able to speed up the process without me having to manually go to the command window and run the code.

    Regards,

    Dan
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:00.
Find Us