• Curriculum Vitae (CV)
• Major web solutions
• Web design projects
• Software solutions
• C# (Microsoft .NET)
• JAVA
• Dynamic HTML
• PHP & MySQL
• ASP.NET - C# & VB.NET
• Perl & CGI
• C | C++
• Vector Markup Language
• SMIL
• Assembler
• Databases
• Wap Development
• Web site promotion
• Web Marketing
|

|
How to create a program whose input is a piped in directory command and whose output is stdout, and whose output represents a batch file which copies every file (not directory) older than specific date?
(Perl free example written by Anton Zamov.) |
How to create a program whose input is a piped in directory command and whose output is stdout, and whose output represents a batch file which copies every file (not directory) older than specific date?
while(<STDIN>)
{
my($line) = $_;
chomp($line);
if($line !~ /<DIR>/) #directories don't count
{
#** only lines with dates at position 28 and (long) filename at pos 44 **
if ($line =~ /.{28}(dd)-(dd)-(dd).{8}(.+)$/)
{
my($filename) = $4;
my($yymmdd) = "$3$1$2";
if($yymmdd lt "971222")
{
print "copy $filename oldien";
}
}
}
}
|
Still have questions?
Ask your question on TechOnlineHelp.com
or find more examples on www.netartmedia.net/examples
If this example was useful for you, please support my company and click Like on the button below.
Thank you very much!
|

|
Jobs Portal, poweful jobs board software
PHP Mall, multi vendors mall website software
Car Portal, php script for auto classifieds websites
NetArt Media, software products and services
Real Estate Portal, web software for real estate portals
Blog System, multi user blog hosting script
PHP Store, powerful e-commerce system written in PHP
Pharmacy System, software for running online pharmacies
|