New answers tagged

5

There are two issues here: How to write a string that contains a quotation within it, when the quotation mark is what signifies to the system when a string begins and ends. How to export strings with special characters, and have them written in their escaped form: \[Alpha] and not α For the first, you need to construct the string using \" to begin and ...


7

Here is an example of formating the srt file. Since it is a text file, it can be exported using the "String" option: exportRST[path_, string_] := Module[{formateLine, strLs,}, formateLine[str_] := Module[{timePos, times, text}, timePos = StringPosition[str, _ ~~ ":" ~~ _ ~~ _ ~~ "." ~~ _ ~~ _]; times = StringTake[str, #] & /@ timePos; text ...


1

If you have a handle to the notebook (of the form CloudObject[...]), DeleteFile[CloudObject[...]] works. (see the documentation of DeleteFile). To retrieve a handle you can do {#, CloudObjectInformation[#]} & /@ CloudObjects[Automatic, Notebook] (* CloudObjects[$CloudRootDirectory,Notebook]*) and choose according to the notebook name. More precisely, ...


3

Run["cat file1.txt file2.txt > newfile.txt"] But be sure to set your working directory to the folder with the files in first: SetDirectory["~/Desktop/Text Cat"]


1

Lets say you have two files 1.txt and 2.txt. You open your terminal, go to the folder and type cat 1.txt 2.txt > new.txt It will give you a new file new.txt combining the content of 1.txt and 2.txt But this is not an answer for mathematica community. Lets do the same thing with mathematica. First I shall create several files. ...



Top 50 recent answers are included