File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+ setlocal enabledelayedexpansion
3
+
4
+ @ REM create star folder
5
+ mkdir star
6
+
7
+ @ REM traverse all zip files in the current directory
8
+ for %%f in (*.zip) do (
9
+ @ REM skip agent.zip
10
+ if /I " %%f " NEQ " agent.zip" (
11
+ @ REM get filename (without extension)
12
+ set " filename = %%~nf "
13
+
14
+ @ REM filename to lowercase
15
+ for %%A in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
16
+ call set " filename = !filename:%%A =%%A ! "
17
+ )
18
+
19
+ @ REM remove star characters from filename
20
+ set " filename = !filename:star =! "
21
+ echo !filename!
22
+
23
+ @ REM create folder with filename
24
+ mkdir " star\!filename! " 2 > nul
25
+
26
+ @ REM move zip file to folder
27
+ move /Y " %%f " " star\!filename! \"
28
+ )
29
+ )
30
+
31
+ @ REM tar agent folder
32
+ tar -xf agent.zip
33
+
34
+ @ REM test agent
35
+ call agent\StarAgent.exe
36
+
37
+ echo move completed
38
+ endlocal
39
+ pause
40
+
You can’t perform that action at this time.
0 commit comments