Open FTP files from command line

Open FTP files from command line

8
NewbieNewbie
8

    Sep 27, 2016#1

    Using Windows UltraEdit version 23.20.0.34. I want to specify an FTP file on the command line that starts UltraEdit. I have a working secure key setup so no password is needed and my FTP Account Manager entry works fine from inside UltraEdit. I've tried this:

    uedit64 "FTP::EDI Prod 1\\/infosol/logs/skt/SOCKET.islog"

    But all that happens is that UltraEdit pops up and opens the last FTP entry I used (and is waiting for me to click connect or whatever)

    Is it possible to open a specific FTP file in this manner? Someone have a working example? I've found topics showing how to do this from inside a script, but in this instance, a script will not work. I'm looking at sending an alert email with a link to open the problem file. Even if I cannot get the link part to work as I want, I can still include a line that can be cut and pasted to the command line to do what I need.

    Thanks in advance!

    6,688587
    Grand MasterGrand Master
    6,688587

      Sep 28, 2016#2

      UltraEdit is a GUI text editor and therefore not designed for FTP actions from command line.

      However, it is possible to record/code an UltraEdit macro or code an UltraEdit script which opens a file via FTP using a configured FTP account, modify it and save the file on FTP server. And this macro or script could be executed from within a batch file using as first argument /fni (force new instance) and as last argument the appropriate option to run the macro/script after starting UltraEdit and exiting after macro/script execution finished.

      If the name of the file/directory path varies, the batch file could write the file name with path into a temporary created text file in %TEMP% and on calling UltraEdit the name of this temporary file is passed as second parameter after /fni on command line, for example with "%TEMP%\FtpFileToModify.tmp". The macro/script selects the file name with path from the opened temporary file and uses it with Open "^s" (macro) or UltraEdit.open("^s"); (script). The temporary file is deleted by the batch file after UltraEdit terminated.

      Please ask for help if you need it to write the little UltraEdit macro/script for this task.
      Best regards from an UC/UE/UES for Windows user from Austria