%% Get Parts of File Name for Windows
% Get the path, name, and extension of myfile.txt.

file = "H:\user4\matlab\myfile.txt";
[filepath,name,ext] = fileparts(file)

% Copyright 2012 The MathWorks, Inc.