Jump to content

Batch File - Deleting Log Files

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Swatcat

Swatcat

    Newbie

  • Members
  • Pip
  • 3 posts
Hi, I am new to the forum and looking for some help, i need a batch file that will delete log files. I need to delete all the .log files in two different locations C:\A\*\*.log and C:\A\*\log\*.log. Here’s the problem I am having, I need the batch file to go through all the folders in the C:\A\ directory. The folders are named randomly and may not contain the C:\A\*\log\ folder. I hope you can understand my problem, thanks for any help.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You could do this fairly easily with a small program in Lazarus.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Swatcat

Swatcat

    Newbie

  • Members
  • Pip
  • 3 posts
Thank for replying WingedPanther, I am not sure what lazarus is. I would like to not have to install any software if possible to run any scripts. I have been told to try to use cywgin but I would have to install that on all the computers that are going to run the scripts and that would become a pain.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Lazarus is basically an open-source, cross-platform clone of Delphi: Lazarus - News

You can build a single .exe that you could just run on each computer. I would NOT go with cygwin for something like this.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Swatcat

Swatcat

    Newbie

  • Members
  • Pip
  • 3 posts
I am not really a programmer, so if someone could code it for me and I could compile it on my PC that would be awesome, thanks for any help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users