Tag Info

New answers tagged

3

The problem is you are using methods to write and read the data which don't preserve the expression structure. WriteString puts the OutputForm of an expression into the file, and so does not preserve the quote marks around strings. Here is a simple example: data = {{"one", "two"}, {"three", "four"}}; Do[WriteString["test.txt", data[[i]], "\n"], {i, 2}]; ...


3

This is a job for Transpose. table = Take[Import["~/myfile.csv"]]; {x, y, z, time, bool} = Transpose[table]; (* do stuff *) output = Transpose[{x, y, z, time, bool}]; Export["newfile.csv", output, "CSV"]


4

This response shows how to obtain more detailed information about directories (and files) using JLink, NETLink and the Win32 API. Such information can be used to determine if a device is offline, non-writable, etc. The various methods differ in how much information they return. JLink The Java 6 File class can be used to retrieve many file system ...


1

I'm extremely grateful to halirutan for repairing my message ! I will try to bother as less I can. Following librik's guidance I wrote two functions: directoryQversionA[unit_]:=Module[ {root,file,ret}, ret=True; root=unit<>":\\"; Quiet[Check[SetDirectory[root],ret=False]]; Return[ret]; ]; directoryQversionB[unit_]:=Module[ ...


12

Since Mathematica is written in the C programming language, it is likely that any file-system status operation is doing nothing more than calling C's built-in functions. In this case, that would be stat. So let's test what stat does on Windows. According to the C language documentation, stat is given the name of something in the file system, and returns a ...


4

Exporting .ico from Mathematica works fine in version 9.0.1. On Mac, the built-in function sips tells me that it only supports image sizes that are a power of 2. So you could try to create the desired file using this: Export["img.ico", img, ImageSize -> {256, 256}] where img is the image to be exported. However, in version 9.0.1 I'm able to export ...



Top 50 recent answers are included