# Prevent info message when file is created

**URL:** <https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096>\
**Category:** Newbie\
**Created:** [August 21, 2020, 4:03pm UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096 "2020-08-21T16:03:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newbie](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Post date:** [August 21, 2020, 4:03pm UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096/1 "2020-08-21T16:03:50Z")

</div>

Dear, I’m running a script that loops over histograms and prints these as eps file

Every time a eps is created, the terminal window is put in the background and a message saying:

Info in TCanvas::Print: eps file has been created

shows up. is there a way to generate the eps files, without this happening?

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [August 24, 2020, 8:52am UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096/2 "2020-08-24T08:52:56Z")

</div>

Hi,

You can follow the same advice as the one given here:

> [@Turn off info message](https://root-forum.cern.ch/t/turn-off-info-message/14675):
>
> Hi, Is there a way to turn off messages like these: “Info in TCanvas::Print: file endcap\_reg\_pt\_bin\_3.png has been created” Thanks. Andrew

---

<div class="post-metadata">

**Author:** ![Newbie](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Post date:** [August 24, 2020, 10:32am UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096/3 "2020-08-24T10:32:26Z")

</div>

Hi! Thanks a lot for your reply, so this will prevent the message to appear, but is there a way to prevent the canvas to pop up? This is actually the main issue, every time a file is generated in the loop, any activity in the computer is interrupted (e.g when you typing something) because of the canvas.

So I was wondering if there is a way to generate all these files in the background. Many thanks

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [August 24, 2020, 11:04am UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096/4 "2020-08-24T11:04:21Z")

</div>

You can add this line at the beginning of your macro:

```auto
  gROOT->SetBatch(kTRUE);

```

or you can run ROOT and your macro in batch mode without graphics, from the terminal:

```auto
root -l -b -q "mymacro.C"

```

---

<div class="post-metadata">

**Author:** ![Newbie](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/n/dc4da7/32.png) [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Post date:** [August 24, 2020, 5:43pm UTC](https://root-forum.cern.ch/t/prevent-info-message-when-file-is-created/41096/5 "2020-08-24T17:43:45Z")

</div>

Thank you very much for the solution !!!
