-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathmakestudy.bat
More file actions
34 lines (30 loc) · 1.04 KB
/
makestudy.bat
File metadata and controls
34 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@echo off
setlocal EnableDelayedExpansion
:: Extracting parameters safely
set "file1=%~f1"
set "file2=%~2"
set "dir1=%~dp1"
set "name1=%~n1"
set "ext1=%~x1"
:: Handling spaces in paths by ensuring the format remains intact
set "file1=!file1:\=\\!"
set "dir1=!dir1:\=\\!"
:: If the second argument (file2) is not provided
if not defined file2 (
if /I "%ext1%"==".graphml" (
echo python mkconcore.py "!file1!" "!dir1!" "!name1!" windows
python mkconcore.py "!file1!" "!dir1!" "!name1!" windows
) else (
echo python mkconcore.py "!dir1!!name1!.graphml" "!dir1!" "!name1!" windows
python mkconcore.py "!dir1!!name1!.graphml" "!dir1!" "!name1!" windows
)
) else (
if /I "%ext1%"==".graphml" (
echo python mkconcore.py "!file1!" "!dir1!" "!file2!" windows
python mkconcore.py "!file1!" "!dir1!" "!file2!" windows
) else (
echo python mkconcore.py "!dir1!!name1!.graphml" "!dir1!" "!file2!" windows
python mkconcore.py "!dir1!!name1!.graphml" "!dir1!" "!file2!" windows
)
)
endlocal