-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathX-PDF-Script.bat
More file actions
34 lines (26 loc) · 778 Bytes
/
X-PDF-Script.bat
File metadata and controls
34 lines (26 loc) · 778 Bytes
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
rem Change the path to the Python interpreter if necessary
set PYTHON_INTERPRETER=python
rem Change the path to the PDF utility script if necessary
set SCRIPT_PATH=X-PDF-Script.py
rem Navigate to the script directory
pushd "%~dp0"
rem Check if the Python interpreter is available
where %PYTHON_INTERPRETER% > nul 2>&1
if errorlevel 1 (
echo Error: Python interpreter not found. Please make sure it is installed and added to your system's PATH.
pause
exit /b 1
)
rem Check if the PDF utility script exists
if not exist "%SCRIPT_PATH%" (
echo Error: PDF utility script not found at "%SCRIPT_PATH%".
pause
exit /b 1
)
rem Run the PDF utility script
%PYTHON_INTERPRETER% "%SCRIPT_PATH%"
rem Return to the previous directory
popd
echo.
pause