function X = uploadBitmapToImgSrc(filename, ext, dataIn, dataOut)
% THUS FUNCTION INVOKES THE SCRIPT FOR EPS-PDF CONVERSION AND MAINTENANCE
% --------------------
% It must be called from inside projectname\matlab\ directory to save files
% correctly.

%checking if folder names terminate with \
% if strcmp(dataOut, '') == 0 & regexp(dataOut, '\\$') == []
%    dataOut = dataOut + '\';
% end
% if strcmp(dataIn, '') == 0 & regexp(dataIn, '\\$') == []
%    dataIn = dataIn + '\'; 
% end

%checking if extension is prefixed with .
if regexp(ext, '^\.') == []
   ext = '.' + ext; 
end

%checking if filename is with extension
if regexp(filename, '\.jpg|\.png|\.tif') == []
    filename = filename + ext;
end

%executing the command
command = ['H:\repo\latex\utils\graphicsMerge\uploadMatlabBitmap.bat ' ' ' filename ' ' ext];


system(command);