Message Boards Message Boards

0
|
1254 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Cannot export gzip directly to network path in Windows

Exporting a file as *.gz works for local folders and mapped network drives but not for a full network address, without the "GZIP" everything works. I first thought is was the way i defined my own Export MIME type, but for normal jpeg export it also fails.

al files are created as they should expect the *.gz with fill network paths.

enter image description here

Does anyone have an idea how to solve this.

In[3]:= << QMRITools`

In[4]:= im = ExampleData[{"TestImage", "Mandrill"}];
dat = RandomReal[{0, 1}, {100, 100, 100}];
vox = {1, 1, 1};

fol1 = "Z:\\F_DataAnalysis\\Development";(*mapped network drive*)
fol2 = "D:\\Werk";(*local drive*)
fol3 = "\\\\xxx\\F_DataAnalysis\\Development";(*full network path*)


In[10]:= DirectoryQ /@ {fol1, fol2, fol3}

Out[10]= {True, True, True}

In[11]:= Export[FileNameJoin[{fol1, "Mandrill1.jpg"}], im, {"JPEG"}]
Export[FileNameJoin[{fol2, "Mandrill2.jpg"}], im, {"JPEG"}]
Export[FileNameJoin[{fol3, "Mandrill3.jpg"}], im, {"JPEG"}]

Export[FileNameJoin[{fol1, "Mandrill1.jpg.gz"}], im, {"GZIP", 
  "JPEG"}]
Export[FileNameJoin[{fol2, "Mandrill2.jpg.gz"}], im, {"GZIP", 
  "JPEG"}]
Export[FileNameJoin[{fol3, "Mandrill3.jpg.gz"}], im, {"GZIP", "JPEG"}]


Out[11]= "Z:\\F_DataAnalysis\\Development\\Mandrill1.jpg"

Out[12]= "D:\\Werk\\Mandrill2.jpg"

Out[13]= \
"\\\xxx\\F_DataAnalysis\\Development\\Mandrill3.jpg"

Out[14]= "Z:\\F_DataAnalysis\\Development\\Mandrill1.jpg.gz"

Out[15]= "D:\\Werk\\Mandrill2.jpg.gz"

During evaluation of In[11]:= Export::fmterr: Invalid GZIP format.

Out[16]= \
"\\\\xxx\\F_DataAnalysis\\Development\\Mandrill3.jpg.gz"

In[17]:= Export[
 FileNameJoin[{fol1, "test1.nii"}], {dat, 
  vox}, {"Nii", {"Data", "VoxelSize"}}]
Export[FileNameJoin[{fol2, "test2.nii"}], {dat, 
  vox}, {"Nii", {"Data", "VoxelSize"}}]
Export[FileNameJoin[{fol3, "test3.nii"}], {dat, 
  vox}, {"Nii", {"Data", "VoxelSize"}}]

Export[FileNameJoin[{fol1, "test1.nii.gz"}], {dat, vox}, {"GZIP", 
  "Nii", {"Data", "VoxelSize"}}]
Export[FileNameJoin[{fol2, "test2.nii.gz"}], {dat, vox}, {"GZIP", 
  "Nii", {"Data", "VoxelSize"}}]
Export[FileNameJoin[{fol3, "test3.nii.gz"}], {dat, vox}, {"GZIP", 
  "Nii", {"Data", "VoxelSize"}}]

Out[17]= "Z:\\F_DataAnalysis\\Development\\test1.nii"

Out[18]= "D:\\Werk\\test2.nii"

Out[19]= \
"\\\\xxx\\F_DataAnalysis\\Development\\test3.nii"

Out[20]= "Z:\\F_DataAnalysis\\Development\\test1.nii.gz"

Out[21]= "D:\\Werk\\test2.nii.gz"

During evaluation of In[17]:= Export::fmterr: Invalid GZIP format.

Out[22]= \
"\\\\xxx\\F_DataAnalysis\\Development\\test3.nii.gz"
POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract