to check whether a directory or filename path is valid or not

the script on excution should take a directory path from useran a numric input and it should check indicate whether its write or not?
if the cmmd sh<script-name>,dir/path.<500>" is greater than 500 in size should be copied to dir ,temp in pwd and display the mesage'files of 2000 bytes hav been copied to dir temp'

Do you mean "whether you can write to it" or "whether it's right"?

What's "cmmd"? If you mean "command", please say so. The posts in this forum should be in plain English.

That sentence makes no sense. Please rephrase it. Where you have code, please put it in [code] tags.

I'm retyping the question as suggested

Script on execution should take a directory path from user and a numeric input.it should flag in case of input missing or wrong path .All files inside directory greater than a the numeric input specified should be copied to another directory temp .At last the total copied file size in temp should be displayed .

Where does it get the numeric input? From the user? From the standard input? From a file?

How do you determine whether the path is right or wrong?

What do you mean by "flag"? Should the script exit or should it continue? Should it notify the user?

How do you determine whether a file is "greater than the numeric input"? Are the file names all numeric? Or do you want to test the contents of the files?

find $1 -size +$2c ! -type d | xargs ls -l |awk '{print $5}'

find $1 -size +$2c ! -type d | xargs -t -I{} cp {} /temp

the above shell can list the size in bytes of all the eligible files in the specified directory. and then write a loop to count the total size.
The second command can be used to copy the files to /temp directory.