I
I
Ingvar Von Bjork2018-04-01 19:13:56
cmd/bat
Ingvar Von Bjork, 2018-04-01 19:13:56

How to split a string into substrings?

There is a string like "folder1/folder2/folder3/file.ras", you only need to get the substring after the last slash.
Those. the result should be "file.ras".
How can this be implemented in cmd?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2018-04-01
@DeboshiR

For example, your string is passed to the batch file in the first parameter:
echo.%~nx1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question