Note:
The "early preview version" indicates that some functions of the software are implemented and previewed, and the existing functions are unstable. Major modifications may be made to later versions. You are welcome to report bugs and follow the updates.
For version updates, see the mgen haiyunguo project.
In the early preview version 1 of the haiyunguo project, only the use of selector and filter is demonstrated. After the early preview version 2, the execution subject of the entire console script system is completed.
Directory
- 1. Rename Part 1 of functions in earlier versions
- 2. Data slot-Use of data Slots
- 3. Actions-Action Support
- 4. Support for the drive selector and filter
Download the current version of the program
Note: This is an archive of Microsoft SkyDrive. Please download it directly in your browser. Some download tools may not be available for download.
Example program running environment:. NET Framework 3.0 (installed by default in Windows Vista and Windows 7)
Update:
Some people reported that the main program (htg.exe) of the haiyun.com project was detected as a Trojan by 360 security guard. After the test, I found that the information provided by 360 security guard is as follows:
Type: Trojan-heur/malware. qvm03.gen
Description: A trojan uses system vulnerabilities to bypass system defense. It steals accounts, steals data, tamper with files, and destroys data. After inspection by the 360 security center, this file is a trojan. We recommend that you handle it immediately.
Scanning engine: cloud feature Engine
File Path: C: \ Users \ mgen \ Desktop \ mgen. htg. EP2 \ htg.exe
File Size: 108.5 KB (111,104 bytes)
File version: 1.1.0.0
Document company:
File Description: mgen htg Project
File fingerprint (MD5): 6e0cb75b275b10f7b1427411007b5b61
Suggested solution: isolate files
The version that is falsely reported is only applicable to the early-stage preview version 2 of the haiyunguo project. I personally expressed my helplessness in this regard, because the haicuo project is completely a hosting program written by C # and does not even have any code to access the network. How can it be a virus?
I simply searched for this so-called "Trojan-heur/malware. qvm03.gen" and found that many people on the internet complained that their program was falsely reported as a virus:
For example, link 1, link 2, and link 3.
If you don't believe what I said, maybe you can use some more professional anti-virus software to check if there is a virus in the early preview version 2 of the haiyunguo project.
Returned directory
1. Rename Part 1 of functions in earlier versions
For ease of input, some functions in earlier versions of 1 were renamed, mainly because of the renaming of selector functions.
The rename result is as follows:
Name of previewed version 1-name changed after previewed Version 2
Vtodd-v_d
Dtoallf-d_af
Dtoalld-d_ad
Dtorootf-d_rf
Dtorootd-d_rd
Returned directory
2. Data slot-Use of data Slots
With the data slot, you can store or reuse the currently executed data. The save_slot function is used to save the data slot. The parameter is a string representing the name of the data slot. The load data slot function is load_slot, and the parameter is also a string that represents the name of the data slot. After load_slot is executed, the content of the corresponding data slot replaces the current data (equivalent to a setdata call ).
For example, use setata to select two folders, save them to the data slot S, use setdata to select two files, and then call show to display two files, because the data in the previous two folders has been overwritten by the second setdata. Load the previously saved data slot and call show. This time, two folders are displayed.
Script:
Ver1;
Setdata dir ['C: \ 'd: \ '];
Save_slot's ';
Setdata file ['C: \ a.txt 'c: \ B .txt'];
Show;
Load_slot's ';
Show;
Running result:
Returned directory
3. Actions-Action Support
The selector and filter mentioned in the early versions of the haiyunguo project are all query operations on the file system. What are the functions of the query results? First of all, you can see it, right? Just as you use SQL to query the database and then the database returns the results you need, the selector and filter of the haiyunguo project are the same. Of course, we can not only view these results, but also use these results for operations. This is the meaning of "action.
Before listing the actions of the haiyunguo project in detail, let's take a simple example to illustrate the actions. Take the simplest action for example: folder name randomization. This action is to change the folder name to a random text. The function name is Da. name_rand (DA is the namespace of all folder actions ).
This is the content in my C drive a folder:
Next, we will use the "selector", "filter", and "action" in the haiyunguo project to rename all the folders in this folder that contain the word "copy" at random. In combination with the learned knowledge, we first need a selector to select the c \ a folder, then select all its root folders, and then filter out all the folders containing the words "copy" with a filter, finally, perform the random RENAME operation with the action.
The script is as follows:
Ver1;
Setdata dir ['C: \ a'];
D_rd;
D. Name contain 'replicase ';
Save_slot's ';
Da. name_rand's ';
After the execution is complete, open the c: \ A folder again and you will find the result is similar to this:
All Folders that contain the word "copy" are renamed.
OK. After a simple example, we will continue to detail the "Action" of the Haicang fruit ". The last line of the script in the preceding example shows that the input parameter of the Action execution function da. name_rand is S, which is the name of the data slot saved in the last row of save_slot. Why do we first introduce the data slot? Because the action requires a parameter, and the source of the parameter depends on the data slot, a parameter is required for random renaming, so we only need to input a data slot name, there are also many action functions that require multiple data slots, such as the file copy function.
In the following example, we perform this operation to copy all the files in drive B to all the root folders in drive. The C drive a folder has just been renamed (for example), so after this operation, all the folders in it will contain the content in the C drive B folder.
The file copy operation function is Fa. copyto (FA is the namespace for all file operations ). The parameter is a string that represents the two data slots. The first data slot represents the list of all files. The second data slot represents the list of all copied folders.
Script:
Ver1;
Setdata dir ['C: \ B '];
D_rf;
Save_slot 'src ';
Setdata dir ['C: \ a'];
D_rd;
Save_slot 'dest ';
Fa. copyto 'src' dest' yes;
OK. After the execution is completed, each folder in disk A contains the file content in disk B.
Early versions 2 are equipped with the following action functions:
Namespace for file operation actions: Fa
Namespace for folder operation actions: da
======================================
Copy: Copy
Parameter 1: Source Path Array
Parameter 2: target path Array
Parameter 3:
For Files: bool: Overwrite
For folders: foldernotoverwrite, folderoverwrite, filenotoverwrite, fileoverwrite
Move: Cut
Parameter 1: Source Path Array
Parameter 2: target path Array
Parameter 3:
For Files: bool: Overwrite
For folders: foldernotoverwrite, folderoverwrite, filenotoverwrite, fileoverwrite
Copyto: copy to a folder
Parameter 1: Source Path Array
Parameter 2: Target folder path Array
Parameter 3:
For Files: bool: Overwrite
For folders: foldernotoverwrite, folderoverwrite, filenotoverwrite, fileoverwrite
MoveTo: Copy to folder
Parameter 1: Source Path Array
Parameter 2: Target folder path Array
Parameter 3:
For Files: bool: Overwrite
For folders: foldernotoverwrite, folderoverwrite, filenotoverwrite, fileoverwrite
DEL: Delete
Parameter 1: path Array
Tre, tmod, and tacc: Modify the creation, modification, and access time.
Parameter 1: path Array
Parameter 2: Time
ATTR: modify attributes
Parameter 1: path Array
Parameter 2: Set, add, and remove represent the settings, add, and remove functions respectively.
Parameter 3: Any system. Io. fileattributes Member
Name_rand: Random rename
Parameter 1: path Array
Parameter 2 (optional): File Name Length (20 by default)
Parameter 3 (for files only): whether to retain the file extension (default value: Yes)
All path array parameters are loaded by the data slot.
Returned directory
4. Support for the drive selector and filter
In earlier versions, only the simplest selector for the drive is available, and no filters are supported. Added more support for the drive selector and filter in earlier versions 2.
First, when setting the drive data in setdata, you can use a colon to represent all the drives. Note that the second parameter of setdata is an array, so you still need to enclose it in brackets. Write as follows:
Ver1;
Setdata drive [':'];
Show;
Result:
Additionally, many filters are added for the drive, as shown below:
Drive Filter
Namespace: V
Type: Drive Type
Parameter 1: system. Io. drivetype enumeration Value
Format: Drive File System Format
Parameter 1: String
Total: total size (capacity)
Parameter 1: size (minimum)
Parameter 2: size (maximum)
Free: available space
Parameter 1: size (minimum)
Parameter 2: size (maximum)
Free_quota: available space (considering the user quota)
Parameter 1: size (minimum)
Parameter 2: size (maximum)
Volume_label: volume label
Parameter 1: String comparison type
Parameter 2: Target string
For example, output the names of all removable drives, and then output all the drive whose file system format is NTFS.
Script:
Ver1;
Setdata drive [':'];
V. Type Removable;
Print 'all removable disks ';
Show;
Setdata drive [':'];
V. Format 'ntfs ';
Print 'all files in NTFS format disks ';
Show;
Running result:
The following message is displayed: Some drives (such as disc drives) cannot check the file format because they are not inserted with any discs.