• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 964
  • Last Modified:

help with PSFTP

hello i have a PSFTP script and i need to run it form a bach file how can i do this ?
0
Chris Jones
Asked:
Chris Jones
  • 6
  • 4
1 Solution
 
Bill PrewCommented:
In the BAT file, do a line like this (assuming PSFTP.EXE is in your PATH):

psftp user@hostname -b myscript.scr

~bp
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
how do i put a file in juyst put the echo command in teh bacth that i call ?
0
 
Bill PrewCommented:
I don't understand your question.

It sounded like you already had an PSFTP script file that you use with that program now, is that correct?  Of do you need to create the PSFTP command file as well?

I'm not sure what you meant by "put a file in"?

~bp
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Chris JonesLead Application Web DeveloperAuthor Commented:
i have this in a bact file will this work

put "\\ctis\dfsroot\EnrollmentReports\symplicity\student.csv" >> psftp.bat
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
then i have a script with this

psftp commercetamudrop@commerce-tamu-advocate.symplicity.com -pw ********** -b psftp.bat
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
any ideal ?
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
I've requested that this question be deleted for the following reason:

no answers
0
 
Bill PrewCommented:
It's good practice to wait a bit longer to close a question with a reason of no answers.  Most Experts here have full time jobs, so only allowing a ferw hours for a solution is not enough time.

Try this as your BAT file.  It will create a CTL file with the PUT command in it, and then pass that to PSFTP when it runs.  Save the below as your BAT file.

@echo off
echo put "\\ctis\dfsroot\EnrollmentReports\symplicity\student.csv"> psftp.ctl
echo quit>> psftp.ctl
psftp commercetamudrop@commerce-tamu-advocate.symplicity.com -pw ********** -b psftp.ctl

Open in new window

~bp
0
 
Chris JonesLead Application Web DeveloperAuthor Commented:
thank you this worked great
0
 
Bill PrewCommented:
Great, glad that helped, thanks for the feedback.

~bp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now