Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:25:44+00:00 2026-06-04T03:25:44+00:00

Suppose I want to copy a file from a Windows local directory (not on

  • 0

Suppose I want to copy a file from a Windows local directory (not on a server) to the AS/400 IFS, how to achieve this using cmd? I know there are other ways like hard drive mapping or iSeries Navigator but the aim here is to use VBA to execute such command so that when someone click a button the target file will be duplicated in the IFS. I tried to use copy command in cmd directly but it failed because the user profile and password were not supplied. So is it possible to achieve this using command in cmd? How? It is acceptable if during the process a window pops up to ask me to fill in user name and password.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:25:46+00:00Added an answer on June 4, 2026 at 3:25 am

    Your options with VBA are:

    • Upload to the IFS via FTP.
    • Upload to the IFS via SMB (iSeries Netserver).
    • Upload to the database and copy to the IFS using [Client] Access automation.

    FTP Example

    You can create an ftp script file and execute it. Here’s how I usually do it with a batch file:

    @echo off
    echo open AS400_HOSTNAME > ftp.cmd
    echo user AS400_USERNAME AS400_PASSWORD >> ftp.cmd
    echo ascii >> ftp.cmd
    echo cd AS400_PATH >> ftp.cmd
    echo put PC_FILENAME AS400_FILENAME >> ftp.cmd
    echo quit >> ftp.cmd
    ftp.exe -n -s:ftp.cmd
    

    NetServer Example

    You can force a username and password when mapping a drive to the iSeries Netserver:

    NET USE Z: \\as400\share /USER:username password
    COPY FILE.TXT Z:\DIR
    NET USE Z: /DELETE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I want to copy a file: scp abc root@10.10.1.1:/home/user/app_abc is there a way
I am interested in using a class file (CameraPreview.java) from this package com.example.android.apis.graphics. I
Suppose I were scripting a deployment using nant on a Windows server to a
Suppose I want to put objects that identify a server into a stl set
I want to have a local copy of a gallery on a website. The
Suppose I have the following data but I basically want to copy the first
I want to run a cronjob from my server which pulls the rss feed
How do you prevent a file descriptor from being copy-inherited across fork() system calls
I suppose the answer to this will be no, but I want to make
Suppose I'm using std::copy of similar function as std::remove_if , ... what it the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.