Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Tired of reposting, confused, tested like crazy, really depressed. That hitme is extremely awesome. Everyone go check it out, and welcome to discuss the above batch processing here.
P.S. If anyone has an invitation from ccf, I'll kowtow to you, please send me one? electronicstar@126.com
Credits 5,226 Posts 1,737 Joined 2006-03-10 00:38 20-year member UID 51697 From 成都
Status Offline
Hehe, what Willsor said makes sense. The advanced application examples of for have long been reposted, but many people haven't noticed that there are treasures in the teaching room.
【Special Topic】Using Script Commands (Command Line and Regular Expressions) to Solve Problems
Microsoft Corporation presents us with a convenient GUI interface, making it very easy to operate the computer. Just move the mouse to solve problems, such as copying, opening files, and shutting down the computer, etc.
But many times, you may have requirements like this: move files from many subdirectories in the same directory to a specified folder at one time. If you use the resource manager to copy files one by one, it will be very tedious. If there are many files, it is almost impossible.
If you are proficient in the command line, you can solve it like this:
for /f %i in ('dir /s/b/a:d movie') do echo d | xcopy "%i" movie1
(This example comes from this post: http://bbs.et8.net/bbs/showthread.php?t=651052)
From the above example, it can be seen that the command line is very suitable for solving some very regular instances that are cumbersome to handle manually.
There are many similar examples. If you often browse the CCF software usage section, you will find them.
Scripts are very suitable for some automated work.
Of course, scripts are not limited to batch scripts, but also more powerful ones like VBS, JS, Perl, Python, etc. You can refer to examples in Microsoft's Script Center.
Everyone is welcome to share their experiences in using scripts and some specific examples.
Although there are不少 posts about these two applications in this section, they are scattered in various questions and answers, which is not convenient to find. So this topic is set up. Original posts and wonderful answer posts about these two applications will be indexed to facilitate CCFers' learning and common improvement.
Credits 653 Posts 252 Joined 2006-04-16 19:48 20-year member UID 53939
Status Offline
Originally posted by afnspy at 2006-6-22 20:10:
asbai: Hello, do you have a registered ID? This website is completely inaccessible to non-registered users
Credits 4,432 Posts 1,512 Joined 2002-10-18 00:00 23-year member UID 19 Gender Male
Status Offline
Re All:
This is a link converted from the result of Baidu site search "【Original】cmd script":
【Original】cmd script - Maxthon batch open section links 1. Reason: I need to sweep through sections like CCF's software exchange, hardware exchange, network exchange every day. Every day each http://bbs.et8.net/bbs/showthread.php?t=707958
【Original】cmd script - Enhanced ping command script (with timestamp) Try it out, tested by win2kchs, some systems need to replace it by themselves http://bbs.et8.net/bbs/showthread.php?t=685994
【Original】cmd script - Duplicate file search A tool for finding duplicate files in CMD version. The characteristics of duplicate files are file name, file size, modification http://bbs.et8.net/bbs/showthread.php?t=691051
【Original】cmd script ---- HTML version of tree command Updated on 2005.7.3 Enter the directory, click layer by layer, find it tedious. The tree command is just for looking. Not http://bbs.et8.net/bbs/showthread.php?t=673085
【Original】cmd script - Simple LAN information collection (simple) Bored, made a simple network information collection. Now includes 1. IP and Mac Address http://bbs.et8.net/bbs/showthread.php?t=685732
【Original】cmd script - (Alternative) Disable and enable USB storage devices The idea is: Occupy the system assignable drive letters and hide them. USB storage devices (u http://bbs.et8.net/bbs/showthread.php?t=695701
【Original】cmd script - OPERA to IE bookmark conversion script Test it. Update it. There are some bugs in the directory structure, which have been fixed. Usage: http://bbs.et8.net/bbs/showthread.php?t=711294
【Original】cmd script - Classify and summarize English words and Chinese characters in text Bored, made one, tested. Function: Count the occurrence of each word in the text http://bbs.et8.net/bbs/showthread.php?t=689716
【Original】cmd script - List the directory where the program file was accessed today Use: mm hid the diary program very deep, but I still found it http://bbs.et8.net/bbs/showthread.php?t=695703
【Original】cmd script - List the top 10 latest directory names in a specific directory Function: List the top 10 latest directory names in a specific directory. Can use http://bbs.et8.net/bbs/showthread.php?t=689957
【Original】cmd script - Network share mount script Function: Mount all shares of a certain host in the network (for example: 192.168.1.99) as network drives http://bbs.et8.net/bbs/showthread.php?t=685206
【Original】cmd script constructs HTML file Net command quick reference manual net /? net view /help is too tedious to check, fiddle with a manual for fun http://bbs.et8.net/bbs/showthread.php?t=673319
【Original】cmd script - Hexadecimal <=> Decimal conversion script Want to convert between hexadecimal and decimal in cmd, do addition, subtraction, multiplication and division by yourself? Drank too much and got a headache, forget it. Steal http://bbs.et8.net/bbs/showthread.php?t=679780
【Original】cmd script - Simple network speed monitoring & list unassigned drive letters for windows2000+ Seems to be useless, heh heh. Code: @ http://bbs.et8.net/bbs/showthread.php?t=678013
【Original】cmd script - Alternative renaming 1. Sometimes need to copy jpg files sorted by directory to the same directory, the files have http://bbs.et8.net/bbs/showthread.php?t=678914
【Original】cmd script constructs HTML file CMD command quick reference manual This is basic... The format is simple, and it is easier to construct. CMD check also http://bbs.et8.net/bbs/showthread.php?t=673324