C # Two functions for crawling directories and filenames based on Web addresses

Source: Internet
Author: User
Tags date ftp iis save file domain domain name
function | file name

C # Two functions based on the site grab directory and filename

I've started to think about this in the software. Today, I finally perfected this code. Happy 2006-10-20, is it more efficient and more focused at night? haha

public void Geturlfolername (string strhtmlpagepath)
{
Crawl the file directory in the URL string

int at = 0;
int start = 0;
int notei=0;
int endi=0;
int[] Myintarray = new INT[10];
String newfoldername;
while (Start < strhtmlpagepath.length) && (at >-1))
{
at = strhtmlpagepath.indexof ('/', start);
if (at = = 1) break;
Myintarray[notei]=at;
start = at+1;
Notei = notei+1;
Endi=at;
}

for (int i=0;i<notei;i++)
{
LSTFILES.ITEMS.ADD (Myintarray[i]);
if (myintarray[i]>0)
{
if (myintarray[i+1]>0)
{
Newfoldername=strhtmlpagepath.substring (myintarray[i]+1,myintarray[i+1]-myintarray[i]-1);
LSTFILES.ITEMS.ADD (newfoldername);
}

}
}

}

public void Geturlfilename (string strhtmlpagepath)
{
Crawl the file name in the URL string
int at = 0;
int start = 0;
int notei=0;
int endi=0;
int[] Myintarray = new INT[10];
while (Start < strhtmlpagepath.length) && (at >-1))
{
at = strhtmlpagepath.indexof ('/', start);
if (at = = 1) break;
Myintarray[notei]=at;
start = at+1;
Notei = notei+1;
Endi=at;
}

for (int i=0;i<notei;i++)
{
LSTFILES.ITEMS.ADD (Myintarray[i]);
if (myintarray[i]>0)
{
if (myintarray[i+1]==0)
{
String C # When downloading files, pop-up Select folder Save directory Code C # gets the corresponding IP address based on the computer name C # get all workgroup and machine names for network neighbors C # List all IIS sites and related site properties C # reads the site-related property code in IIS C # new site, delete site function code C # under the picture file to the local, c#,c# download, download pictures, download files, download functions C # According to the URL to get the domain name, directory name, file name function C # To obtain information about the local computer FTP Web site files to local C # code C # Pop-up when saving files select the folder you want to save class code with the new folder effect Code in C # that calls the corresponding application to open the file sequence Datasheet file export Execel file-local test succeeded C # New save file with code named by date time C # Two functions for crawling directories and filenames based on Web addresses C # download file functions C # code to download files with line Cheng parameters C # Control techniques and flaws for downloading files using threads asp.net installation using the OWC component to build execel steps Bulk crawl HTTP and email addresses in web code, IO, regular expressions, grab Web sourceName=strhtmlpagepath.substring (myintarray[i]+1,strhtmlpagepath.length-myintarray[i]-1);
LSTFILES.ITEMS.ADD ( C # When downloading files, pop-up Select folder Save directory Code C # gets the corresponding IP address based on the computer name C # get all workgroup and machine names for network neighbors C # List all IIS sites and related site properties C # reads the site-related property code in IIS C # new site, delete site function code C # under the picture file to the local, c#,c# download, download pictures, download files, download functions C # According to the URL to get the domain name, directory name, file name function C # To obtain information about the local computer FTP Web site files to local C # code C # Pop-up when saving files select the folder you want to save class code with the new folder effect Code in C # that calls the corresponding application to open the file sequence Datasheet file export Execel file-local test succeeded C # New save file with code named by date time C # Two functions for crawling directories and filenames based on Web addresses C # download file functions C # code to download files with line Cheng parameters C # Control techniques and flaws for downloading files using threads asp.net installation using the OWC component to build execel steps Bulk crawl HTTP and email addresses in web code, IO, regular expressions, grab Web sourceName);

txtsavefilename.text= C # When downloading files, pop-up Select folder Save directory Code C # gets the corresponding IP address based on the computer name C # get all workgroup and machine names for network neighbors C # List all IIS sites and related site properties C # reads the site-related property code in IIS C # new site, delete site function code C # under the picture file to the local, c#,c# download, download pictures, download files, download functions C # According to the URL to get the domain name, directory name, file name function C # To obtain information about the local computer FTP Web site files to local C # code C # Pop-up when saving files select the folder you want to save class code with the new folder effect Code in C # that calls the corresponding application to open the file sequence Datasheet file export Execel file-local test succeeded C # New save file with code named by date time C # Two functions for crawling directories and filenames based on Web addresses C # download file functions C # code to download files with line Cheng parameters C # Control techniques and flaws for downloading files using threads asp.net installation using the OWC component to build execel steps Bulk crawl HTTP and email addresses in web code, IO, regular expressions, grab Web sourceName.tolower ();
}
}
}

}




Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.