如何复制网页文件,请高手指点
在C盘上有27封网页文件(如SD.HTML)等,每个网页文件里只有一条数据记录如“2003/12/03 52683.27 3369857”,现在需将数据记录复制到对应文本文件(如SD.TXT)的文件尾,请高手帮忙用程序实现它,小弟在此先谢了! 问题点数:0、回复次数:25Top
1 楼kingerq(多菜鸟)回复于 2003-12-04 08:26:32 得分 0
upTop
2 楼zlbox(zlbox)回复于 2003-12-04 09:37:07 得分 0
在DOS窗口中运行 type *.html ->sd.txtTop
3 楼njwzd(WZD)回复于 2003-12-04 15:22:35 得分 0
在DOS窗口中运行 type *.html ->sd.txt时,电脑提示“系统找不到.htm文件。Top
4 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-04 15:57:25 得分 0
呵呵..只好用DOS命令啦
假设,你的文件都放在C盘的test 下面.
在DOS里面
C:\test>copy *.htm ok.htm
就行了啦.
Top
5 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-04 16:03:01 得分 0
是加在结尾啊,不好意思,没注意看.
还是在DOS里面.
C:\test>copy sd.txt+*.htm sd.txt
我的演示..
C:\>cd test
C:\test>copy sd.txt+*.htm sd.txt
sd.txt
1.htm
2.htm
已复制 1 个文件。
C:\test>Top
6 楼stoneg(IUnknown)回复于 2003-12-04 16:13:14 得分 0
是 type *.html > out.txt
或 type *.htm > out.txtTop
7 楼njwzd(WZD)回复于 2003-12-04 18:00:24 得分 0
谢谢,我用的系统是WINDOWS XP,会有影响吗?怎么DOS的界面和您的不一样。我是“开始-运行-CMD"进入DOS界面,不知是不是有错。
--------------------------
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\001\桌面>
Top
8 楼wangmingsky(磨碎的沙子)回复于 2003-12-04 19:02:53 得分 0
没有关系,你可以在C:\Documents and Settings\001\桌面>下一直用cd..
直到出现C:\>再用C:\>cd testTop
9 楼njwzd(WZD)回复于 2003-12-04 19:46:58 得分 0
怎么出现不了C:\,在C:\Documents and Settings\001\桌面>下一直用cd..,用了不下五十多次,这怎么搞呀,请帮忙。Top
10 楼njwzd(WZD)回复于 2003-12-04 23:21:49 得分 0
情帮忙Top
11 楼njwzd(WZD)回复于 2003-12-05 11:34:32 得分 0
各位高手请帮忙,谢谢!Top
12 楼caaclxf(有人说我的名字很长)回复于 2003-12-06 13:01:40 得分 0
居然还记得用DOS来实现呀..佩服Top
13 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-06 13:55:18 得分 0
用C:\就行了.. 你的DOS真不过关 :)
C:\Documents and Settings\001\桌面>c:\
C:\Top
14 楼kingerq(多菜鸟)回复于 2003-12-06 21:29:21 得分 0
够绝的,我喜欢。
不过我还记得dos命令哦。
我想楼主按自己的方法进入dos,显示下面提示符:
C:\Documents and Settings\001\桌面>
命令:
cd\ 转到要目录。如C:\>_
cd abc 进入abc目录。
cd d: 转到D盘。
cd.. 转到父目录。
再根据各位高手给你的方法,完成你的操作吧。
各位我说的还对吧。:)Top
15 楼kingerq(多菜鸟)回复于 2003-12-06 21:30:37 得分 0
cd\ 转到根目录。如C:\>_
Top
16 楼njwzd(WZD)回复于 2003-12-07 14:16:49 得分 0
DOS进不了根目录下的C:\>_, 请kingerq(多菜鸟)指点,在XP的界面中如何进入DOS,谢谢,另请教在WINDOWS XP中,如何完成对网页文件内容的复制。Top
17 楼cg2002(孤家寡人)回复于 2003-12-07 14:37:32 得分 0
cd.. huiche
cd.. 在回车。就ok!leTop
18 楼njwzd(WZD)回复于 2003-12-07 15:02:48 得分 0
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>cd
C:\Documents and Settings\001\桌面
C:\Documents and Settings\001\桌面>
以上是cd.. ..回车的电脑界面,请高手指点Top
19 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-07 16:52:25 得分 0
我写得很明白啊.是
cd\
你少了一个 "\" 了..Top
20 楼njwzd(WZD)回复于 2003-12-08 00:06:49 得分 0
谢谢老师的指点,现在已进入DOS界面,也能复制文件,但复制文件的内容和原文件的内容不一样。原文件的内容只有一行,而复制后的文件内容没有原文件的内容。它的内容如下:
b<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<link rel=File-List href="SH600029.files/filelist.xml">
<link rel=Edit-Time-Data href="SH600029.files/editdata.mso">
<link rel=OLE-Object-Data href="SH600029.files/oledata.mso">
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>user</o:Author>
<o:LastAuthor>user</o:LastAuthor>Top
21 楼njwzd(WZD)回复于 2003-12-08 00:08:58 得分 0
接上
<o:Created>2003-12-02T17:21:23Z</o:Created>
<o:LastSaved>2003-12-02T17:21:23Z</o:LastSaved>
<o:Company>user</o:Company>
<o:Version>10.2625</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:DownloadComponents/>
<o:LocationOfComponents HRef="file:///F:\新建文件夹%20(2)\"/>
</o:OfficeDocumentSettings>
</xml><![endif]-->
<style>
<!--table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{margin:1.0in .75in 1.0in .75in;
mso-header-margin:.5in;
mso-footer-margin:.5in;}
tr
{mso-height-source:auto;
mso-ruby-visibility:none;}
col
{mso-width-source:auto;
mso-ruby-visibility:none;}
br
{mso-data-placement:same-cell;}
.style0
{mso-number-format:General;
text-align:general;
vertical-align:middle;
white-space:nowrap;
mso-rotate:0;
mso-background-source:auto;
mso-pattern:auto;
color:windowtext;
font-size:12.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:宋体;
mso-generic-font-family:auto;
mso-font-charset:134;
border:none;
mso-protection:locked visible;
mso-style-name:常规;
mso-style-id:0;}
td
{mso-style-parent:style0;
padding-top:1px;
padding-right:1px;
padding-left:1px;
mso-ignore:padding;
color:windowtext;
font-size:12.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:宋体;
mso-generic-font-family:auto;
mso-font-charset:134;
mso-number-format:General;
text-align:general;
vertical-align:middle;
border:none;
mso-background-source:auto;
mso-pattern:auto;
mso-protection:locked visible;
white-space:nowrap;
Top
22 楼njwzd(WZD)回复于 2003-12-08 00:09:59 得分 0
mso-rotate:0;}
.xl24
{mso-style-parent:style0;
mso-number-format:"\@";}
ruby
{ruby-align:left;}
rt
{color:windowtext;
font-size:9.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:宋体;
mso-generic-font-family:auto;
mso-font-charset:134;
mso-char-type:none;
display:none;}
-->
</style>
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Sheet1</x:Name>
<x:WorksheetOptions>
<x:DefaultRowHeight>285</x:DefaultRowHeight>
<x:CodeName>Sheet1</x:CodeName>
<x:Selected/>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>Sheet2</x:Name>
<x:WorksheetOptions>
<x:DefaultRowHeight>285</x:DefaultRowHeight>
<x:CodeName>Sheet2</x:CodeName>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
<x:ExcelWorksheet>
<x:Name>Sheet3</x:Name>
<x:WorksheetOptions>
<x:DefaultRowHeight>285</x:DefaultRowHeight>
<x:CodeName>Sheet3</x:CodeName>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>8610</x:WindowHeight>
<x:WindowWidth>14475</x:WindowWidth>
<x:WindowTopX>600</x:WindowTopX>
<x:WindowTopY>525</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body link=blue vlink=purple>
<table x:str border=0 cellpadding=0 cellspacing=0 width=525 style='border-collapse:
collapse;table-layout:fixed;width:394pt'>
<col width=93 style='mso-width-source:userset;mso-width-alt:2976;width:70pt'>
<col width=72 span=6 style='width:54pt'>
<tr height=19 style='height:14.25pt'>
<td height=19 class=xl24 width=93 style='height:14.25pt;width:70pt'>2003/12/01</td>
<td align=right width=72 style='width:54pt' x:num>4.53</td>
<td align=right width=72 style='width:54pt' x:num>4.64</td>
<td align=right width=72 style='width:54pt' x:num>4.53</td>
<td align=right width=72 style='width:54pt' x:num>4.59</td>
<td align=right width=72 style='width:54pt' x:num>3558.29</td>
<td align=right width=72 style='width:54pt' x:num>9550</td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=93 style='width:70pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
<td width=72 style='width:54pt'></td>
</tr>
<![endif]>
</table>
</body>Top
23 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-09 08:17:21 得分 0
你不是说
每个网页文件里只有一条数据记录如“2003/12/03 52683.27 3369857”
怎么多了这么多的东东啊..
Top
24 楼wanghr100(灰豆宝宝.net(努力工作))回复于 2003-12-09 08:17:47 得分 0
你把其中的一个网页代码贴出来给我看看吧.Top
25 楼njwzd(WZD)回复于 2003-12-09 23:20:03 得分 0
wanghr100(灰豆宝宝.net)老师:您好
也不知哪个地方出错,请指正。我想将文件上传到本贴上,请您给看看,但不知怎么上传法。谢谢Top




