I tried to do the following :
Do[
f1 = StringReplace[
"obsxxxx.out", {"xxxx" -> ToString[i]}];
Print[f1];
,
{i, 200}];
and obtain
obs0001.out
obs0002.out
...
obs0010.out
...
obs0100.out
...
and so on.
I tried that:
ToString[Flatten[IntegerDigits[20, 10, 4]]]
but I still have a list ...