Move files if file name doesn't exist considering extension
Save the following as a text file and make it executable. Invoke it from the command line, passing in the paths to folder A and folder B.

#!/usr/bin/ruby

if ARGV.size != 2
    STDERR.print "#Usage: #{$0} source/folder destination/folder\n"
    exit 1
end

a = ARGV[0].chomp("/")
b = ARGV[1].chomp("/")
old_bases = Hash.new
Dir.foreach(b) do |f| 
    next if f =~ /^\./
    old_bases[f.sub(/\.[^.]*$/, "").downcase] = true
end
Dir.foreach(a) do |f|
    next if f =~ /^\./
    fbase = f.sub(/.[^.]*$/, "").downcase
    unless old_bases[fbase]
        File.rename( "#{a}/#{f}", "#{b}/#{f}" )
        old_bases[fbase] = true
    end
end


Script edited to check number of arguments, and fix error in File.rename

Edited again to ignore case. That is, don't move Bar.png if bar.jpg already exists.