using mv command for moving multiple files in a folder

Hi,

I have a requirement where

I need to move Bunch of folders containing multiple files to another archive location.

i want to use mv command .I am thinking when we use mv command to move directory does it create directory 1st and then move all the files ?

e.g

source location =/source/tmp1
/tmp2
/tmp3
destination location =/dest/Archive/

mv /source/* /dest/Archive/
tmp1 .tmp2 and tmp3 has multiple files

so my question is while executing move cmd will it create directory 1st and then move file ?

Also if i want to check if move command error out before completing the complete file.

How to do this ?

What Operating System do you have?
Are the source and destination on the same mountpoint? If they are on the same mountpoint, is there enough disc space to copy the lot then delete the source if it is successful?
What should the destination tree look like? (i.e. does it contain directories called tmp1 tmp2 and tmp3 ?).
Do you need to preserve timestamps on the target directories?

What Operating System do you have?
I am using AIX .
Are the source and destination on the same mountpoint? If they are on the same mountpoint, is there enough disc space to copy the lot then delete the source if it is successful?

yes they are on the same mount point and have enough space

What should the destination tree look like? (i.e. does it contain directories called tmp1 tmp2 and tmp3 ?).

yes
Do you need to preserve timestamps on the target directories?

Not exactly

Actually i have written a script but i am not able to get an idea in case the script fail in between the archival process ? how to handle that or how to track if an error occurs.

Sorry, not got AIX handy at the moment and the script I would use would need testing on AIX. I'll let an AIX expert comment.

Try the cpio command with find, something like:

find /source -print | cpio -pvdmu /dest/Archive

Check the man page of find for the options.