Tweet
SIGN UP
Member Login:
POST A QUESTION
CATEGORIES
.Net
Brain Exercise
Database
Design Patterns
General
Hardware
Languages
Networking
OOP
Operating System
Reporting
Testing
Third-Party Tools
Web Development
COMPANIES
Others
MCN Solutions
Infosys
HCL
MCN Solutions Pvt. Ltd
Mindcracker
Questpond
IBM
InfoAxon Ltd
Wipro
JOB FUNCTIONS
Senior Management
Project Manager
Project Lead
Tech Lead
Team Lead
Architect
Sr. Developer
Sr. Programmer
Programmer
Developer
DBA
How can we use SFTP in C# to transfer file to another location ?
Posted by
shrikant kesharwani
in
.Net
|
ASP.NET
on
Oct 18, 2011
Tweet
4522
2
0
how to stored and retrive video in Sql server using asp.net c#......? I want correct step by step sir/madam..........
What is .NET?
Related Questions
how to transfer the file from client to server using asp.net
C# WInforn config file database password encription while saving the file
Can I modify the contents of a Text Fille (Notepad file) when the file is being used by an application in ASP.Net / C#
Why do uploads fail while using an ASP.NET file upload control to upload large files
how can v append one rtf file with another rtf file without using dll
Retrieve data using date range in .NET using C# with SQL SERVER
Do you know the answer for this question? Post it below.
Steps to transfer file from one loc to other
1)Mention the path,user credentials like
string s += "192.168.0.61" + " ";
s += "-l " + "XYZ" + " ";
s += "-pw " + "XYZ" + " ";
where
- l-login
-pw-password
System.Diagnostics.ProcessStartInfo startinfo = new System.Diagnostics.ProcessStartInfo();
startinfo.CreateNoWindow = false;
startinfo.UseShellExecute = false;
startinfo.FileName = Server.MapPath("~/Pres/psftp.exe");
startinfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startinfo.Arguments = textfile;
startinfo.RedirectStandardInput = true;
startinfo.RedirectStandardOutput = true;
Process p = Process.Start(startinfo);
p.StandardInput.WriteLine("cd foldername");
FileInfo[] files = new DirectoryInfo(Server.MapPath("~//Bach/")).GetFiles("*.txt", SearchOption.TopDirectoryOnly);
foreach (FileInfo tfile in files)
{
fileFullName = tfile.FullName;
filename = Path.GetFileNameWithoutExtension(tfile.Name);
list.Add(filename);
p.StandardInput.WriteLine("mput " + fileFullName);
}
p.StandardInput.WriteLine("quit");
Posted by
shravan kumar
on
Nov 02, 2011
QUESTION POST LEADERS
1
2
3
4
5
6
7
8
MOST POPULAR QUESTIONS
What is Serialization in .NET, types of Serialization and why we need it while developing an application?
What’s the difference between an interface and abstract class?
What is difference between UNIQUE and PRIMARY KEY constraints
What is Polymorphism? How does VB.NET/C# achieve polymorphism?
What’s the difference between the Debug class and Trace class?
What is a "Virtual Directory"?
What is Difference between ASP.NET 2.0 and ASP.NET 3.5
explain about page life cycle in Asp.net
Difference between NTFS and FAT32
What are the magic tables available in SQL Server 2000?
Sponsored by
Become a Sponsor
MOST LIKED QUESTIONS
What is Polymorphism? How does VB.NET/C# achieve polymorphism?
TAG CLOUD
PREMIUM SPONSORS
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
View More
LATEST JOBS
Applying for job
Metro Style App Developer
.NET Developer WPF or Silverlight exp Boston MA
ASP .Net Developers
Split Testing Designer
.NET Developer
Web Developer
Application Engineer Expert
.NET Developer
Application Developer
View All Jobs
|
Interview Questions
|
Ask a Career Question
Sponsored by
Become a Sponsor
WHITEPAPERS AND BOOKS
Essentials of Capacity Planning: Microsoft SharePoint Server 2010
Chapter 15: Customizing the Display
Chapter 9: OpenType Font Support
Successfirmations: Think, Reveal, Receive
SharePoint Designer 2010 Essentials
Building Standalone Data-Driven Applications using SQL Server Compact 4.0
Programming XML with C#
Reporting with Reports Viewer in Visual Studio 2005
Programming C# for Beginners
Programming Windows Common Dialogs with Visual C# 2010
View All
TOP MEMBERS
MOST VIEWED
TRENDING NOW
PRIZES
AWARDS
BOOK REVIEWS
SURVEY
Hosted By
CBeyond Cloud Services
PHOTOS
TIPS
CONSULTING
TRAINING
STUDENTS
MEMBERS
MEDIA KIT
SUGGEST AN IDEA