Questions tagged [files-and-directories]
Questions on obtaining files and directory structure/information and manipulating the said structure/information, searching/renaming particular files in a directory, etc., in an OS independent manner.
491
questions
4
votes
1
answer
101
views
Is there an easy way to batch the change of StyleSheet in 120 notebooks
At one point in the past I believed that a style sheet colocated with a notebook would not require a path. For example, if my notebook resided in the same directory as this style sheet, the style ...
0
votes
1
answer
61
views
Why do I get a wrong data structure using Module? [closed]
I am using Module and reading rawlen.txt files from nb100, nb200 , ... folders. I have written a piece of program to calculate strain and I expect the results to have the following structure:
{{0.}, {...
0
votes
0
answers
42
views
Could you help me understand where in my code I produce a list with a specific dimension?
I am reading force.txt files from series of folders nb100, nb200 ,nb300, ... . and I need to save the related results as result100, result200, ... in the related directories.
In order to do that I ...
1
vote
0
answers
51
views
Save the mathematica notebook on cloud as PDF on System/Cloud
I am using mathematica on the free Wolfram cloud version.
I first tried using the option of "Print to PDF" available under the "File" on the top of Nav Bar. However, it redirects ...
2
votes
1
answer
78
views
How to copy/merge one directory into another like done by default in windows file explorer?
What is the easiest way to copy one directory into another programmatically?
I tried:
...
1
vote
1
answer
63
views
Compressing a file's name string
I was working with files where each name records a lot of information about what is in its respective file and wanted to compress it a little bit. So I wanted to change it's 'base'.
And I noticed that ...
8
votes
2
answers
208
views
Are there any functions to change file permissions?
I looked but couldn't find any functions that would let me manipulate file permissions from Wolfram Language. I'm talking about things like read-only (on Windows), writable (on Unix), executable (...
0
votes
0
answers
28
views
OpenWrite Error: "already open as"
Mathematica gives the error "[file] already open as [file]" when I execute OpenWrite, even if I use a completely new name and pointer. Could this be related to using both Write and ...
2
votes
0
answers
37
views
Weird behaviour of Image`ImportExportDump`ImageReadPNG
Here is the problematic code,
...
0
votes
1
answer
43
views
Searching directory over a network
I have a network drive mapped on my Windows machine. I need to read data from the network that is nested in a few directories below the root. Example is "G:/Data/folder01/data/date_name/values....
0
votes
0
answers
50
views
Automating the process of restarting mathematica (and all open notebooks) after the operating system updates
The hassle of restarting Mathematica by hand after a required operating system restart makes it tempting to repeatedly delay operating system updates, which is a security risk.
Has anyone written ...
6
votes
5
answers
904
views
How to sort filenames in actual numerical order?
I have inherited a collection of files that are numbered... something like:
file-0, file-1, file-2, ... file-9, file-10, file-11, ... file-19, file-20, ...
When I Import them, they come in scrambled ...
1
vote
1
answer
76
views
$Path changes randomly from day to day
I use the following code to open my custom code notebook code.m:
NotebookOpen[$Path[[6]] <> "\\code.m"]
But the ...
3
votes
0
answers
136
views
How to get satellite image directly from Mathematica?
First, I get the image of the bands of the desired area from the site https://earthexplorer.usgs.gov/, then I import the images into Mathmatica by addressing them as below:
Select dataset directory:
<...
0
votes
0
answers
72
views
Delete last line in an open OutputStream
I have Mathematica code that creates a file (more precisely, I use OpenWrite and create an OutputStream object) and I use ...