开发者

Moving files from root directory in AS400

I have a script which moves and renames files from an AS400 directory to a Windows directory on a separate server. The successful process moves data from a folder created in a library on the AS400. For technical reasons the AS400 developer moved the source data to the root on the AS400.

Now that I have modified the script to point to the different source I get an error "In开发者_JAVA技巧valid procedure call or argument". My question is can we move data from the AS400 root or does it have to reside within a library? I can still move files from within the library but not from the root. Any advice? Thanks!


If I'm reading your comment (and your previous question) correctly, you need to be able to move a file with the ability to overwrite. One way to do that is by copying and deleting. CopyFile will overwrite a file by default.

fso.CopyFile strFromFile, strToPath
fso.DeleteFile strFromFile

See the following MSDN pages for CopyFile and DeleteFile for additional details.


If the root is "/" then this is not a library and you are having a flat file similar to what it will be on the Windows box. You will most likely not be able to use your existing toolkits for this, but perhaps CPYSTRF or similar? Can you just ftp it in from the Windows box?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜