<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Λοιπά θέματα</title><link>https://www.dotnetzone.gr:443/cs/forums/29/ShowForum.aspx</link><description>Οτιδήποτε άλλα θέματα developing που δεν κολλάνε σε κάποιο από τα υπόλοιπα forums!</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Batch για διαγραφή log files παλιότερων των 30 ημερών</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9780.aspx</link><pubDate>Thu, 16 Feb 2006 22:33:05 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9780</guid><dc:creator>dimkasta</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9780.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=29&amp;PostID=9780</wfw:commentRss><description>Eίναι άχετα custom logs.&lt;br&gt;Bρήκα αυτό και δουλεύει μια χαρά. Σώστε το σε ένα αρχείο τχτ και αλλάξτε την κατάληξη σε vbs.&lt;br&gt;&lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; fso, fldr, fc, f1 &lt;span style="color: Green;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;'fldname, usrname, srcFile&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;set&lt;/span&gt; FSO &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; Wscript.&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;CreateObject&lt;/span&gt;(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;"scripting.FileSystemObject"&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;fldname &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;"D:\logsTest"&lt;/span&gt;  &lt;span style="color: Green;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;'&amp;lt;---- change to top directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Const&lt;/span&gt; DateofFile=-30 &lt;span style="color: Green;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;'&amp;lt;----- age of deleted files&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;DeleteFiles &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; FSO.GetFolder(fldname)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Set&lt;/span&gt; fldr &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; fso.GetFolder(fldname)&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Recurse fldr&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Set&lt;/span&gt; fldr &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Nothing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Set&lt;/span&gt; fso &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Nothing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;wscript.echo &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;"Files Deleted Successfully"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Wscript.Quit&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Public&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Sub&lt;/span&gt; Recurse( &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;ByRef&lt;/span&gt; fldr)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;dim&lt;/span&gt; subfolders,files,folder,file&lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Dim&lt;/span&gt; srcFile&lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Set&lt;/span&gt; subfolders &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; fldr.SubFolders&lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Set&lt;/span&gt; files &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; fldr.Files&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;For&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Each&lt;/span&gt; srcfile &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;in&lt;/span&gt; files&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;If&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;DateDiff&lt;/span&gt;(&lt;span style="color: #666666;background-color: #e4e4e4;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;"d"&lt;/span&gt;, &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Now&lt;/span&gt;, srcFile.DateLastModified) &amp;lt; DateofFile &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   FSO.DeleteFile srcFile, &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;True&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Green;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;'************** Recurse all of the subfolders.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;For&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Each&lt;/span&gt; folder &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;in&lt;/span&gt; subfolders&lt;br /&gt;&lt;br /&gt;        Recurse folder&lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Green;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;'************** Deletes empty folders&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (fldr.files.&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;count&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; 0) &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;and&lt;/span&gt; (fldr.subfolders.&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;count&lt;/span&gt;) &lt;span style="color: Red;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; 0 &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;on&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;error&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;resume&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      fldr.delete&lt;br /&gt;&lt;br /&gt;             &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;exit&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;end&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;End&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Lucida Console;font-size: 11px;font-weight: normal;"&gt;Sub&lt;/span&gt;&lt;/span&gt;&lt;br&gt;</description></item><item><title>Απ: Batch για διαγραφή log files παλιότερων των 30 ημερών</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9719.aspx</link><pubDate>Wed, 15 Feb 2006 21:26:44 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9719</guid><dc:creator>Mitsaras</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9719.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=29&amp;PostID=9719</wfw:commentRss><description>Υποθέτω εννοεί τα logs του Event log. Στην περίπτωση αυτή όμως, το Event log έχει auto-pruning δυνατότητα.</description></item><item><title>Απ: Batch για διαγραφή log files παλιότερων των 30 ημερών</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9716.aspx</link><pubDate>Wed, 15 Feb 2006 21:00:05 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9716</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9716.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=29&amp;PostID=9716</wfw:commentRss><description>Τι log files; Από κάποιο application ή IIS/SQL Server; Σε VBScript κάτι;</description></item><item><title>Batch για διαγραφή log files παλιότερων των 30 ημερών</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/9712.aspx</link><pubDate>Wed, 15 Feb 2006 20:06:59 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:9712</guid><dc:creator>dimkasta</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/9712.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=29&amp;PostID=9712</wfw:commentRss><description>Θέλω ένα σκριπτάκι που να σβήνει από ένα φάκελο τα log-files που είναι παλιότερα από ένα μήνα.&lt;br&gt;Η σκέψη μου είναι να το κάνω απλά ένα scheduled task και να τρέχει αυτόματα κάθε βράδυ.&lt;br&gt;Μπορεί να με βοηθήσει κάποιος γιατί δεν έχω ιδέα από scripts?&lt;br&gt;Thanks in advance&lt;br&gt;Δημήτρης&lt;br&gt;</description></item></channel></rss>