Be aware that this code creates a file with spaces in the filename, which is generally considered not a nice thing (tm).#!/usr/bin/perl -w use strict; use File::Copy; my $current_filename = "foo"; my $new_filename = "foo" . localtime; move($current_filename, $new_filename) or die "Couldn't move $current_filename to $new_filename: $!\n +";
In reply to Re: File Rename
by davis
in thread File Rename
by lostinpearl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |