Answers for "batch filename"

0

batch filename

@echo off
setlocal
set file=C:\Users\l72rugschiri\Desktop\fs.cfg
for %%i IN ("%file%") DO (
   	echo filedrive=%%~di
	echo filepath=%%~pi
	echo filename=%%~ni
	echo fileextension=%%~xi
)

REM # | filedrive      |     %~d[file-variable-name]
REM # | filepath       |     %~p[file-variable-name]
REM # | filename       |     %~n[file-variable-name]
REM # | file-extension |     %~x[file-variable-name]
Posted by: Guest on July-06-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language