Home : General : Perl Programming :

General: Perl Programming: Re: [PerlFlunkie] how to transfer image from one dir to another?: Edit Log

Here is the list of edits for this post
Re: [PerlFlunkie] how to transfer image from one dir to another?
This works! Smile Had to look in the correct directory... Must be suffering from code blindness. Cool


Code:
opendir (GRAPHIC, "$SAVE_DIRECTORY/validate") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
$file_test = $id . ".";
foreach $file (@files) {
if ($file =~ /^$file_test/) {
move("$SAVE_DIRECTORY/validate/$file", "$SAVE_DIRECTORY/$file") or die "Move failed: $!";
}
}


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Nov 18, 2009, 4:16 PM

Edit Log: