Error flashing a new atmega 328p using arduino uno r3 as ISP..

I am trying to write a flash (hex) file to new atmega 328p using my arduino uno r3 as ISP.I uploaded Arduino ISP sketch to my arduino. I placed the new atmega 328p on a breadboard and added a 16 mhz crystal and two 22pf capacitors. I wired my arduino like this..
Arduino pin Atmega 328p pin
13 19 SCK
12 18 MISO
11 17 MOSI
10 1 Reset
and i added 16 Mhz crystal between pins 9 and 10 and the 22 pf capacitors too.
Now i opened command prompt and gave the command ---

avrdude -P com3 -b 19200 -c avrisp -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xDE:m -U lfuse:w:0xFF:m

It went quite well and all the fuses have been set properly... Now i copied the hex file to the folder where AVRdude.exe is present (I'm having WinAVR). Now i gave the command ---

avrdude -P com3 -b 19200 -c avrisp -p m328p -v -e -U flash:w:RGB.hex -U lock:w:0x0F:m

It didnt go well. The hex file was not uploaded properly. I'm getting the following error ---

C:\Windows\system32>avrdude -P com3 -b 19200 -c avrisp -p m328p -v -e -U flash:w
:RGB.hex -U lock:w:0x0F:m

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "L:\WinAVR-20100110\bin\avrdude.conf"

Using Port : com3
Using Programmer : avrisp
Overriding Baud Rate : 19200
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW Max
W ReadBack



eeprom 65 5 4 0 no 1024 4 0 3600 36
00 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 45
00 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 45
00 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 45
00 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 45
00 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 45
00 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0
0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0
0 0x00 0x00

Programmer Type : STK500
Description : Atmel AVR ISP
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as 5
avrdude: erasing chip
avrdude: reading input file "RGB.hex"
avrdude: error opening RGB.hex: No such file or directory
avrdude: input file RGB.hex auto detected as invalid format
avrdude: can't open input file RGB.hex: No such file or directory
avrdude: write to file 'RGB.hex' failed

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK

avrdude done. Thank you.

Please help. Whats the error? All the connections are correct. Why is not flashing the file to atmega 328p?

"avrdude: error opening RGB.hex: No such file or directory"

When you use the cmd, console, or whatever you call it, you must be in the same folder where the .hex is. It seems like the current folder doesn't contain RGB.hex.

You could specify the path to the hex file.
For example if the hexfile is in D:/hfiles

The commandline would be

avrdude -P com3 -b 19200 -c avrisp -p m328p -v -e -U flash:w:D:/hfiles/RGB.hex:i -U lock:w:0x0F:m