-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsysutil1.bat
55 lines (48 loc) · 1.07 KB
/
sysutil1.bat
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
color 0E
title Utility Batch File
:main
cls
echo =========================================
echo Utility Batch File
echo =========================================
echo.
echo Current date and time: %date% %time%
echo.
echo Files and directories in the current folder:
echo -------------------------------------------
dir /b
echo -------------------------------------------
echo.
echo 1. Delete a file
echo 2. Exit
echo.
set /p choice=Choose an option (1-2):
if %choice%==1 goto delete_file
if %choice%==2 goto end
goto main
:delete_file
cls
echo =========================================
echo Delete a File Utility
echo =========================================
echo.
echo Files in the current folder:
echo -------------------------------------------
dir /b
echo -------------------------------------------
echo.
set /p filename=Enter the name of the file to delete:
if exist %filename% (
del %filename%
echo %filename% has been deleted.
) else (
echo File not found.
)
pause
goto main
:end
echo.
echo Thank you for using the utility!
pause
exit