my $path = 'C:\TestSQL';
my @scripts = `dir /B /s $path`;
foreach my $sqlfile (@scripts) {
if ( $sqlfile =~ /^(.+\.sql)\s*$/i ) {
`mysql <db_name> -u <user_name> -p <password> < $sqlfile.sql`;
}
}
my @scripts = `dir /B /s $path`;
foreach my $sqlfile (@scripts) {
if ( $sqlfile =~ /^(.+\.sql)\s*$/i ) {
`mysql <db_name> -u <user_name> -p <password> < $sqlfile.sql`;
}
}
No comments :
Post a Comment