PLEASE HELP to convert file to .nii file

6 views (last 30 days)
Amanda
Amanda on 4 Jan 2021
Answered: Cris LaPierre on 5 Jan 2021
Hello, urgent help needed,
I was given data that was delivered to me as a zip folder, with all files compressed to .rar. After extracting and decompressing all folders, each folder has around 5-10 thousand files.
I need my fmri and mri data to be given in one of the following formats: .nii, .brk, .head, .nii.gz, .txt, .mat-file
The current filetype is simply "file"
Any ideas will help.
  2 Comments
Cris LaPierre
Cris LaPierre on 5 Jan 2021
What happens if you change the extension from "file" to one of these extensions? Can you open one of the files in a text editor and determine what the actual file type is?
Consider attaching one of your files to your post using the paperclip icon.
Amanda
Amanda on 5 Jan 2021
I see what you're saying, and it may work. So how can I add an extension to all files in a folder?
(The current filetype is simply "File", and I have several hundred to several thousands of files in each folder)

Sign in to comment.

Answers (1)

Cris LaPierre
Cris LaPierre on 5 Jan 2021
Look into movefile, which will move or rename a file or folder
Before investing in renaming all of them, just try it out on one or two files. You can just change the extension manually as see if you can open the file in the expected program.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!