psftp -b switch (batch file) - SSH

This is a discussion on psftp -b switch (batch file) - SSH ; Is it possible to use local variables with psftp method calls inside of batch files? Batch file example: !SET putFile= %cfg_path%\\UPLOAD.DAT put %putFile% %putFile% literally ("can't find %putFile%") If "cfg_path" varies how does one pass this correctly to psftp -> ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: psftp -b switch (batch file)

  1. psftp -b switch (batch file)

    Is it possible to use local variables with psftp method calls inside
    of batch files?
    Batch file example:

    !SET putFile= %cfg_path%\\UPLOAD.DAT <=====run local windows command
    put %putFile% <=====not sure what to use here - psftp interprets
    %putFile% literally ("can't find %putFile%")

    If "cfg_path" varies how does one pass this correctly to psftp -> put ?


  2. Re: psftp -b switch (batch file)

    K.Faw writes:
    >Is it possible to use local variables with psftp method calls inside
    >of batch files?
    >Batch file example:
    >
    >!SET putFile= %cfg_path%\\UPLOAD.DAT <=====run local windows command
    >put %putFile% <=====not sure what to use here - psftp interprets
    >%putFile% literally ("can't find %putFile%")


    No, there's no way to do variable substitution within PSFTP currently.
    You'd either have to write the .BAT file dynamically, or control PSFTP
    from some scripting language (and I don't know how well that would
    work).

+ Reply to Thread