I’m creating a .bat file that is creating customised tv recording icons for mediaportal tvserver and need your help. I start with the following string
SET "path_and_filename=D:\TEMP FOLDER\TV RECORDINGS\TV3\Campbell Live\Campbell Live - 2012-10-25 - S38536.ts"
I’m trying to create 4 seperate variables from %path_and_filename% containing
-
The filename (without extension)
eg. Campbell Live – 2012-10-25 – S38536 -
The filepath
eg. D:\TEMP FOLDER\TV RECORDINGS\TV3\Campbell Live\ -
The file’s parent folder
eg. Campbell Live -
The file’s parent parent folder
eg. TV3
Thank You
Easily done using FOR variable modifiers and
.for current folder and..for parent folder. (typeHELP FORfrom command prompt to get info on modifiers at bottom of help)Sample output: