# How can I convert NIFTI files to NRRD files in batch mode?

**URL:** <https://discourse.slicer.org/t/how-can-i-convert-nifti-files-to-nrrd-files-in-batch-mode/11841>\
**Category:** Support\
**Created:** [June 3, 2020, 2:30am UTC](https://discourse.slicer.org/t/how-can-i-convert-nifti-files-to-nrrd-files-in-batch-mode/11841 "2020-06-03T02:30:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 3, 2020, 2:32am UTC](https://discourse.slicer.org/t/how-can-i-convert-nifti-files-to-nrrd-files-in-batch-mode/11841/2 "2020-06-03T02:32:32Z")

</div>

You can write a few-line Python script that iterates through all the nifti files in that folder, loads the volume, then saves it as nrrd.

You can find examples in [script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Load_volume_from_file) for loading and saving volume. This post can also help (and there were other similar questions here before that you may be able to find):

> [@how to load mrb file and save all nodes in nii format using script](https://discourse.slicer.org/t/how-to-load-mrb-file-and-save-all-nodes-in-nii-format-using-script/6169):
>
> Operating system: windows 10 Slicer version:4.8.1 Expected behavior: save nodes in nii format using script Actual behavior: only can save in nrrd format Hi, I want to export image and labelmap node in nii format to a directory using python script. My script is: mrbfile=r’D:\sample.mrb’ outdir = r’D:\output\_dir’ loadScene(infilename) saveScene(outfilename[:-4]) slicer.mrmlScene.Clear(0); However, this could only save node in nrrd format, the 3D Slicer default format. How could I save …

---

_[View the full topic](https://discourse.slicer.org/t/how-can-i-convert-nifti-files-to-nrrd-files-in-batch-mode/11841)._
