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.

learn more… | top users | synonyms

-1
votes
0answers
30 views

Insert several sequential alphanumeric characters pdf [closed]

As I can make it through "this" directory 1 to "this" in the directory 2 and so on for 50 pdf, Deputy sample directory Example
6
votes
4answers
164 views

Searching a phrase in all *.nb files

I have so many *.nb files in a folder. In one of them I have written a phrase, unfortunately I cannot remember that file. I am searching about it and the file in ...
6
votes
0answers
98 views

How to unlock a stylesheet which is not needed anymore by the FrontEnd

Reply from WRI Support: [...] This indeed seems to be an issue with the Frontend on Windows and I have alerted the development team about this. Unfortunately I do not have a work around at ...
2
votes
2answers
122 views

Is there the possibility to write many times a value in definite list of file1.nb?

The commands testData = RandomReal[{0, 1}, {1, 1}]; Export["C:\\Users\\Alex\\Desktop\\1\\file1.nb", testData]; write the “testData” (value generated by ...
0
votes
0answers
20 views

How to attach a notebook to a question? [migrated]

As I have posted a number of times, I am still learning how to do things here. I was wondering if someone could help me to figure out how to attach a notebook file to a question. Thanks Tarynn
19
votes
3answers
3k views

Relative paths for portable notebooks in Mathematica

I cannot find how to use relative paths in Mathematica. My directory structure is simple. ...
2
votes
1answer
62 views

Using Mathematica to batch-produce text files

I need to make a bunch of plaintext files, all of which differ only in a single parameter. The text I want to "copy" or "batch produce" is a little bit complex, since it contains quoted areas and ...
4
votes
0answers
89 views

Creating compiled search TRIE file for argument string completion

I'd like to generate a compiled search TRIE file (like those found in $InstallationDirectory\SystemFiles\FrontEnd\SystemResources\FunctionalFrequency\) to help ...
6
votes
1answer
87 views

How to make captions for a movie?

I'm trying to make my own video parody with custom subtitles. Creating your own custom subtitles file in a text editor with the SubRip or .SRT format is easy to do, it looks like this: Where ...
1
vote
0answers
59 views

Why do I get “There appers to be an error in the file named below”?

For first time in my life, I have just suffered the error: " "There appears to be an error in the file named below". "Parse and load the entire notebook upon opening.", doesn't help. I have saved ...
4
votes
2answers
217 views

Custom PopupMenu file selector

Lately I come across what I think not uninteresting problem which is a good exercise for the usage of Dynamic. Assume you have files in a directory structure (a ...
1
vote
1answer
73 views

How to delete notebook files from the Wolfram Cloud

I have version "10.0 for Mac OS X x86 (64-bit) (September 10, 2014)" I have several notebooks stored in the Wolfram cloud, but don't see how I can delete certain ones I no longer need.
1
vote
2answers
87 views

How to join .txt-files without importing?

Is it possible to write a code, telling MMA to join 2 (or even more) .txt-files without importing them?
5
votes
1answer
232 views

Watch File in Directory .NET

How might I watch for a specific file to change in a directory using Mathematica/.NET code? The following works in .NET but fires twice when you change the file. ...
23
votes
2answers
6k views

How to import all files of a folder at once?

I know how to import one textfile by calling its name filestring = Import["myfile.tex", "Text"]; Then "filestring" is a string with the myfile content. How do ...
0
votes
0answers
60 views

Notebook contents changed upon re-opening

Cross-posted in http://tieba.baidu.com/p/4439694061 I was so puzzled that why in Mathematica after I saved the nb file and when I opened it again the contents changed totally? Another point that ...
28
votes
0answers
459 views

What is the difference between a .wl package and a .m package?

In Mathematica 10.x, one now has both .wl Wolfram Language Packages and .m Wolfram Mathematica Packages. What's the ...
1
vote
2answers
47 views

Why autocompletion of file name is not working in notebookdirectory?

I use windows system and Mathematica 10 The default working directory is c:\\user\\name\\document If I type Import["xx , ...
6
votes
3answers
290 views
2
votes
0answers
53 views

Using DirectoryQ difference with windows and Unix naming, forward slash problem

update: send email to Wolfram support. CASE 3561304. Will update if they confirm this is a bug or not. Should Mathematica DirectoryQ["z/"] return False when the ...
1
vote
1answer
60 views

Inconsistency of WriteString

Important Note A kernel or maybe Front End restart probably fixed the problem. I did something weird today which is evaluate Context[StringQ]="test`", perhaps that ...
18
votes
2answers
238 views

How to find the package file that stores a certain symbol?

Is it possible to figure out in what file a certain packaged symbol lives in (assuming there is no shadowing between multiple identical symbol names)? I would like to have a function that if, given a ...
0
votes
1answer
40 views

Finding text files in a given path and applying a function to those files

I made a function called "SolveLinearSystem[]" that solves,as its name suggests, a linear system of any amount of variables. It takes the path of a text file as its only argument. The function then ...
3
votes
1answer
49 views

What causes the error NotebookEvaluate::nbnfnd?

Help says: NotebookEvaluate can take either a NotebookObject or a filename referencing a notebook file. therefore, I wonder why ...
0
votes
2answers
65 views
0
votes
1answer
60 views

How to set the current Directory as the default?

Everytime, before my code, I always write, SetDirectory[NotebookDirectory[]]; So, how to make this as the default ?
1
vote
1answer
45 views

DOS-like Wildcard for Filtering List of Files [duplicate]

I have a list of file names that I would wild like to filter based on a DOS like wildcard specification similar to what can be used as the first argument,"forms", of ...
3
votes
2answers
88 views

Cannot find BaseDirectory or UserBaseDirectory in Mac OS El Capitan

I am new to Mac OS, so this might be a silly question, but.... I just searched for $BaseDirectory and $UserBaseDirectory in my ...
3
votes
1answer
129 views

Set permission of created directories by CreateDirectory

What determines permission mask of directories created by CreateDirectory? Calling CreateDirectory["/tmp/dir"] gives ...
0
votes
1answer
26 views

FileBaseName and a dot in the folder name

FileBaseName["F:\\2016-02-23\\11.5_mm_fan_off_pumps_off_1500_hz_3793_\ images_2048_1472_pixels_20160223_1649_time_part"] should give the base folder name: ...
0
votes
0answers
58 views

Why does this code produce an infinite loop?

I can't understand the way this code behaves and suspect that is because of some unrecognized reasons of general interest. Otherwise, I apologize and will retire the question. In ...
5
votes
2answers
72 views

how to get the size of a directory(total size of all files under this directory or its subdir or …)

I use Mathematica10 in my Win7 and I want to estimate the amount of disk space occupied by each dirs. I try the code(the code was copied from How do I find the amount of free space on disk?, actually ...
6
votes
0answers
71 views
4
votes
1answer
98 views

depository/repository of Mathematica notebooks

Is there a depository/repository of Mathematica notebooks (not necessarily Mathematica packages) where one can upload some of their notebooks so as others can access them easily?
2
votes
3answers
70 views

How to make a list (of data points) whose name is the same as the file name from which the data is imported [duplicate]

I have a set of files, e.g. file1.dat, file2.dat,... containing data (list of data points to plot, manipulate...) I want to do the following ...
2
votes
2answers
76 views

How to separate the double columns while reading file

I have a file which has contents of the form 10533 "MENDOZAT " 115.0000 : 1 1.00000 Now I want to separate the words and get it as a list. like ...
0
votes
1answer
77 views

How to zip a folder? [duplicate]

This straightforward approach doesn't seem to work: In[42]:= cmd = StringSplit@"zip -r ~/data.zip ~/test/*" In[43]:= RunProcess@cmd Related: How can I ...
1
vote
1answer
41 views

Select folder with ChoiceDialog and return deepest folder name

For selecting a folder which contains data files I use the following code: ChoiceDialog[{FileNameSetter[Dynamic[dir], "Directory"], Dynamic[dir]}]; ...
1
vote
2answers
82 views

How to set the relative directory so that they work both in script and in notebook and portable?

Maybe the question is not clear, here I try to state it in more detail: I have a folder named project, for instance. In it I have two folders, one is named ...
1
vote
2answers
90 views

How do I set Mathematica to open a specific folder - When I type “Command + O” in OS X [closed]

When I type "Command + O", in Mac OSX 10, Mathematica automatically opens my directory: "Users/john" How can I change this setting to make it open "Users/john/Documents/Mathematica/GameOfLife" the ...
4
votes
3answers
189 views

How do I copy files to the clipboard?

Is there a way to mimic the Ctrl + V for a given file? I've got Mathematica to locate a certain file path, but I don't bother to copy the file in File Explorer (I will do this many times).
12
votes
2answers
3k views

How to place cdf file in Microsoft Word, Powerpoint or in interactive PDF file?

I would like to create a presentation for my lecture in which I would use Mathematica CDF files. Let's say I want to have such interactive content: ...
1
vote
1answer
60 views

How to export a list of numerical data to a file in the terminal?

I have a very simple program that export a list to a data file in table form. ...
10
votes
4answers
284 views

Handy / flexible directory tree operations

Is there any shorter / more handy / more flexible way to get directory tree as a nested Rules/Associations list? I tried to incorporate ...
6
votes
1answer
79 views

How do I directly read the Nth byte from a binary file?

I have a very large binary file (several hundred GB) which I would like to process using Mathematica. I only need to process a few bytes of this file at a time, and I know in advance which bytes I ...
1
vote
1answer
97 views

Using ReadList to import specific arrays of a multi-dimensional variable

Consider a large numerical variable (almost 1GB) which was constructed like below: output={scalar1,{Matrix1,Matrix2,Matrix3,scalar2}}; I used ...
1
vote
0answers
96 views

SemanticImport::unexpinvaliderr error when using trial version

I am trying to use SemanticImport for a personal experiment. I can correctly import a tsv file from a path, but if I change ...
2
votes
1answer
56 views

Get (<<) Evaluate File Name

This seems like a simple question due to lack of experience, but I can't seem to find an answer through searching. I am trying to read back a symbol from a ...