The recent project requires operations on the FTP server. The implementation is summarized as follows:
It is intended to be summarized in two parts:
1st summary some conventional Ftp operations (such as uploading, downloading, creating, deleting, and transferring files between FTP)
Article 1 summarizes some other
Using System;
Using System. Collections. Generic;
Using System. Text;
Using System. IO;
Namespace ConsoleApplication1{Class Program{Static void Main (string [] args){// Instantiate the test class, which is used to call the copy function in the classTest a = new test ();A. copy ("D :\\ create folder (2)", "D :\\ create folder"); // Test}// Write the test classPub
. DirectoryPath;ElseThis.freturnpath = String.Empty;return dres;}}
General selection file Save address with pop-up dialog box to selectCallDirbrowser mydirbrowser=new Dirbrowser ();if (Mydirbrowser.showdialog ()!=dialogresult.cancel)MessageBox.Show (Mydirbrowser.returnpath);
public class Dirbrowser:foldernameeditor{FolderBrowser fb = new FolderBrowser ();public string Description{set {_description = value;
Original Folder A, B, new Folder C, in the case of pictures as an exampleA:00001.jpg 00002.jpg 00003.jpg 00147.jpgB:00001.jpg 000000002.jpg 00147.jsonThe first case: Find files with the same contents under two folders, save and output to folder CIdea: Determine whether the c
1. Original fileRequired Files:#-*-Coding:utf8-*-ImportOSdefsplitsentence (inputfile,name): Fin= Open (Inputfile,'R')#open a file in a read way Printname Fout= Open ('/home/xdj/abstract1/'+name,'W')#open a file in the way it was written forEachlineinchFin:if 'abstract=' incheachLine:fout.write (eachline)#writes the result of the word breaker to the output file.fin.close () fout.close () path='/home/xdj/abstract'FNS=[os.path.join (ROOT,FN) forRo
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.