Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DOS batch file query

    Not sure if this is the right place, to ask, but I'm looking for
    help in closing a .txt file that opens during my automated back-ups.

    I need to find a way to close it from within the DOS batch file
    which is controilling the process.

    Any suggestions please.

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    The "obvious" answer would be to get the program that opens this TXT file to close it. Then the backup could back up everything successfully...

    You really need to say a bit more about the TXT file.

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    Thanks

    I had tried to look at the txt file - created by PestPatrol running in command line mode - but couldn't see any option to close it from within PestPatrol.

    There is an option to stop it displaying however, so i can get round it that way, but it is not as convenient.

    Colin

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    Can you stop PestPatrol while you're doing the backups?

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    There about 6 to 8 individvidual Batch files which run each nite, doing defrags, spyclean, empty recycle etc. Each batch file does similar tasks, so the one I'm concerned with runs Ad-Aware, Spybot & Pest-Patrol each night, then archives the log files. Each of these progs is run in command-line format

    I use winzip to carry out the back-up elements, also controlled froma a command line interface.

    I've already edited the bat file to stop the .txt file opening in the first place.


    Colin

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    Perhaps PSKill will do the job for you?
    -Mark

  7. #7
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    I'll have a look


    Colin

  8. #8
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    Mark

    I thought he wanted to close a file, not terminate a process!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  9. #9
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    492
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    Their web page suggests it is for NT/2000.

    Is it safe for XP ?

  10. #10
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    Yes, but I don't think it will do what you want.

    PSKILL "terminates processes on local or remote systems"...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  11. #11
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    To be sure, John...killing notepad is one way to close the file! <img src=/S/anigrin.gif border=0 alt=anigrin width=19 height=19>
    -Mark

  12. #12
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    Colin, Windows XP is just Windows 2000.1 if you look at the version numbers. I was wondering, though, if you wrote the batch file that is opening the log file. If so, what is the syntax that is causing it to open?
    -Mark

  13. #13
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    Where did NOTEPAD come into this? I thought it was PestPatrol which was creating the TXT file and holding it open!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  14. #14
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DOS batch file query

    Yes, but... it sounds like the .txt file is likely being "opened" by the default program associated with .txt files -- and for 95% of users, that would be NotePad.

    OK, so it is a slight assumption, but I'll bet it is correct. PestPatrol itself does not likely "open" the .txt file. Instead it more likely uses the associated program. Therefore, slamming shut NotePad should be successful.

  15. #15
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DOS batch file query

    Colin hasn't actually said what is in this TXT file. I have assumed that it is a form of LOG file (like the notorious SQL.LOG file) which is written to while PestPatrol is running (either a scan or as a resident "watcher", perhaps).

    It would be fairly easy to see if NOTEPAD is running by looking at the Processes tab of Task Manager.

    However, I don't have PestPatrol, so this is fairly speculative...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •