1,350 pts.
 copying objects from directory
how to copy objects from a directory to another directory in as400, 

Software/Hardware used:
as400 v4r5
ASKED: August 25, 2011  4:51 AM
UPDATED: March 31, 2012  5:44 PM
  Help
 Approved Answer - Chosen by Rajasekhar15 (Question Asker)

CPY OBJ('autl/*.*') TODIR(newautl)

That command would copy files from a directory named autl to a directory named newautl. Both of those should exist in the job's current directory (because they are specified as relative paths and because the TODIR() must exist).

Because the SUBTREE() parameter defaults to *NODIR, no subdirectories will be copied by that command. Because the pattern contains a "." character, only files with a "." in the name will be copied.

What problems are you having with the CPY command?

Tom

ANSWERED:  Aug 25, 2011  11:11 PM (GMT)  by Rajasekhar15

 
Other Answers:

Hi Rajasekhar,

Do you mean copying Objects from one directory to another directory or copying files through IFS?
If it is the first case(Copying objects from one library to another library), You will need to use CRTDUPOBJ command or use Option ’3′ at the particular object.
And, mention the To Library and Object Name.

In second case, You can directly copy the file or document and paste it in another folder.

Pradeep.

Last Wiki Answer Submitted:  August 25, 2011  5:18 am  by  deepu9321   3,370 pts.
Latest Answer Wiki Contributors:  deepu9321   3,370 pts.
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

 

yeah deepu u r correct, but actually i need to copy some objects from a dir to another dir, normaly we can do it by using cmd cpy,

EX: i’m having dir raja and having some files in it.
now i want to copy those files to another dir raja1.

 1,350 pts.

 

That looks fine. Are you facing any problem in copying files using copy command?
If so, Mention the error description.

Pradeep.

 3,370 pts.

 

pradeep if we use cpy cmd, it copies with that dir and its objects, but i need only objs to cpy

 1,350 pts.

 

I didnt get you exactly.
Only objects mean?
Select the file you want copy, and use Copy command, mention To Directory and To File Name.

Pradeep.

 3,370 pts.

 

Tom,

i says more than one name matches pattern,

sample:

Directory . . . . : kennedy1/kennedy
Type option, press Enter.
1=Select

Opt Object link
KENN.txt
PFKENN.txt
RPG.rar

if we choose multi option 1:
it says
Only 1 selections allowed. 3 selections made.

if we choose 1le object:
it says
object name already exits

i need that 3 objects to move another directory.

Thanks

 1,350 pts.

 

sorry TOM its works thanks a lot:-)

 1,350 pts.