login about faq

Currently we use the Tectia file transfer software to FTP files. We have a PowerShell script that is used to execute sftpg3.exe with a batch file using the Tectia Profile. Since there is very little code in either the PowerShell script or the batch file we don't want to split up the logic.

So we were wondering if there is a way to use sftpg3.exe without a batch file and do everything in PowerShell. Are there sftpg3 commands that PowerShell will recognize or is there a way to specify the remote and local directories as arguments? (As an added bonus I would like to remove the need for RedirectStandardOutput and receive errors from Tectia directly).

PowerShell code is something like follows:

#Define paths for Standard output and errors
[string]$stdout = "D:\Logs\Standard_$(get-date -f hhmmss_yyyyMMdd).txt"
[string]$stderror = "D:\Logs\Error_$(get-date -f hhmmss_yyyyMMdd).txt"

#Start sftpg3.exe
Start-Process sftpg3.exe  -argumentlist '-B',  "D:\FTP\Command.bat", 'Profile1'-RedirectStandardOutput $stdout -RedirectStandardError $stderror


#All done

And the batch script is like:

cd outbox
lcd "\\XX.XX.XX.XXX\In"
mget *.*

asked Aug 29 '16 at 20:27

jreev086's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 29 '16 at 20:27

Seen: 11,329 times

Last updated: Aug 29 '16 at 20:27

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.