I don't understand your question
Are you copying a file named "XXXX1234.ABCDEF" to "XXX1234"? (#1)
Or are you transforming one file to another and transforming the contents from "XXXX1234.ABCDEF" to "XXX1234"? (#2)
And did you mean to have 4 X's in the first and 3 in the second?
If #2 above, must you use korn/awk? Any of python/ruby/
perl/
sed would do the job as well.
--
Qman