http://www.perlmonks.org?node_id=820564

A couple of little shortcuts for Windows to put in your "Send To" folder...

This one makes a copy of the selected file, but appends the date and time - e.g. out.txt creates out_20101311022.txt

C:\Perl\bin\wperl.exe -e "use File::Copy;$ARGV[0]=~/(.*\\)([^\\\.]*)(. +*)/;$file=$1.$2.'_'.(join'',(localtime)[5]+1900,(localtime)[4]+1,(spr +intf\"%.2d%.2d%.2d\",(localtime)[3,2,1])).$3;copy($ARGV[0],$file);"

This one is almost identical, but renames rather than copies...

C:\Perl\bin\wperl.exe -e "$ARGV[0]=~/(.*\\)([^\\\.]*)(.*)/;$file=$1.$2 +.'_'.(join'',(localtime)[5]+1900,(localtime)[4]+1,(sprintf\"%.2d%.2d% +.2d\",(localtime)[3,2,1])).$3;rename $ARGV[0],$file;"

And just for completeness, here's to the clipboard as filename (which I've posted before):

C:\Perl\bin\wperl.exe -e "use Win32::Clipboard;$clip = '\"' . $ARGV[0] + . '\"';Win32::Clipboard($clip);"

Hope someone finds these useful...

map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk