I'm assuming you're on Windows. Perhaps you don't have a "C:\temp"? (Be careful to either use "C:/temp" note the use of double quotes and the forward slash or to use 'C:\temp' single quote and backslash. If you double quote and backslash you'll have to escape the backslash i.e. "c:\\temp".
Also: add a my to the $dir as in

thanks bro , it is work done
but I have a small question :
why when we add a my to $dir , it is work done ??
and without it , it doesn't work?
please answer my small question .
thanks again for your helping :)

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other