eb4b340
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
opendir ( DIR, "." ) or die "Couldn't open directory, $!"; $ChunkName = $ARGV[0]; $ChunkId = $ARGV[1]; while ( $file = readdir DIR ) { if ( $file =~ m/(.*).p3d/ ) { $/ = ".p3d"; chomp( $file ); `p3dmutate -m $ChunkName -i $ChunkId -f "Name" -a $file $file.p3d 1>&2` } } close DIR