function | file name
#region get the function of domain name, directory, file name in the URL
public string Geturldomainname (string strhtmlpagepath)
{
String p = @ "http://[^\.] *\. (? <domain>[^/]*) ";
Regex reg = new regex (p,regexoptions.ignorecase);
Match m = Reg. Match (Strhtmlpagepath);
return m.groups["domain". Value;
}
Public string[] 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[] Arrayfoldername=null;
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;
}
Arrayfoldername=new String[notei-1];
for (int i=0;i<notei;i++)
{
if (myintarray[i]>0)
{
if (myintarray[i+1]>0)
{
Newfoldername=strhtmlpagepath.substring (myintarray[i]+1,myintarray[i+1]-myintarray[i]-1);
Arrayfoldername.setvalue (Newfoldername,i);
}
}
}
return arrayfoldername;
}
public string 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];
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= "";
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++)
{
if (myintarray[i]>0)
{
if (myintarray[i+1]==0)
{
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);
}
}
}
Return 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 ();
}
#endregion