Encrypt username and password on batch script RRS feed

  • Question

  • I'm trying to load flat file into server through FTP using batch files. I'm aware of the scripts and I'm able to transfer the file to server. Currently I'm following this below method.

    @echo off
    title File Transfer
    color 3F
    cd "C:\Users\username\Desktop\Access\"
    echo -
    echo - Transferring File to Server. Please be patient... 
    echo -
    echo - Closing this window will Terminate the entire process 
    ftp -n -s:"C:\Users\username\Desktop\Access\ftp.txt" server_name >"C:\Users\username\Desktop\Access\ftp.log"

    Script File Code:[ftp.txt]

    User Userid password
    mkdir App
    put "C:\Users\username\Desktop\Access\File.txt"   "App/File.txt"

    My requirement i should not expose username and password on the script file. These credential information dynamically coming from the variables and I'm generating this batch file and script file dynamically.

    Again i'm calling this batch script from shell commands on access vba?

    Kindly any experts suggest me solution which makes more sense to accomplish this requirement. Thanks in advance.

    Venkat G

    • Edited by Venkat G Tuesday, December 8, 2015 5:26 PM
    Tuesday, December 8, 2015 5:21 PM


  • Using ftp.exe, you cannot encrypt the password. It requires the password in plain-text if you use the -s parameter.

    -- Bill Stewart [Bill_Stewart]

    • Marked as answer by Bill_Stewart Friday, January 8, 2016 4:10 PM
    Tuesday, December 8, 2015 5:30 PM