
Editor’s note: Emadkaradsheh saw the response and posted a new question related to the original. I have deleted that post and pasted his response here:
I asked the question earlier and got a response. I need an “EASY” to be able to copy all the files in a directory (I will not know the file names) to an ASN file or library. Are there any commands I can use to do that without having to write RPG programs. I just need a list of files in that directory, and then I can use cpyfrmstmf to bring them into an AS/400 DB.

There is no an “EASY WAY” to do that. No such command available. You must write a program (CL or RPG) using APIs or look for a commercial tool.
Regards,
Wilson

Retrieve Directory Information (RTVDIRINF)
Type choices, press Enter.
Directory . . . . . . . . . . .
Directory subtree . . . . . . . *ALL *ALL, *NONE
Information file prefix . . . . *GEN Name, *GEN
Information library . . . . . . QUSRSYS Name
Will list the files in a directory in a database file the command creates.

Hi DanD,
It’s a great command I didn’t knew till now. It will solves Emadkaradsheh problem!
Thanks!
Wilson

thank you. That seems to have put the data into an AS/400 file, but I am not sure what kind of data it is. I was expecting a file that I could query, but I assume the file is not a DB2 file.
Am I doing something wrong, or is there another step to copy the file.

The file created by the command is a queriable(word?) database file. I don’t know why you would have a problem, but do F1 the “Information file prefix . . . . *GEN Name, *GEN” and read the help. The command outputs two files with different level of information, but runqry works on both.















