MATLAB: Write changing string format into txt file

changing format fprintf/sprintf

Hey! I would like to write into a txt file, the location of my working directory.
I tried the function fprintf (or sprintf) but the problem is that I can't define a fixed format (with strings backlslash and integers) when I am using fprintf (or sprintf) because the format is changing when the working directory is changing!
Thanks for the help.

Best Answer

Alright!
By simply using the function save it worked out.