Yes, you can use If
for this.
If[
True,
Print["true 1"];
Print["true 2"];
Print["true 3"];,
Print["false 1"];
Print["false 2"];]
...should do the three "true" prints.
If[
False,
Print["true 1"];
Print["true 2"];
Print["true 3"];,
Print["false 1"];
Print["false 2"];]
...should do 2 "false" prints.
If you don't want the false branch at all you can do...
If[
condition,
TrueStuff[],
Null]
The Null
can be implicit:
If[
condition,
TrueStuff[],]
And though it's undocumented, you can leave out the non-true branch(es) entirely:
If[
condition,
TrueStuff[]]