Skip to main content
Commonmark migration
Source Link

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 greek letters that I want to be output in their \[letter] format. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i, letter α

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1, letter \[Alpha]

 

My house number 2 is "my house" number 2, letter \[Alpha]

 

My house number 3 is "my house" number 3, letter \[Alpha]

 

My house number 4 is "my house" number 4, letter \[Alpha]

respectively (i.e, the first output file the first phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

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 greek letters that I want to be output in their \[letter] format. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i, letter α

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1, letter \[Alpha]

 

My house number 2 is "my house" number 2, letter \[Alpha]

 

My house number 3 is "my house" number 3, letter \[Alpha]

 

My house number 4 is "my house" number 4, letter \[Alpha]

respectively (i.e, the first output file the first phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

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 greek letters that I want to be output in their \[letter] format. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i, letter α

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1, letter \[Alpha]

My house number 2 is "my house" number 2, letter \[Alpha]

My house number 3 is "my house" number 3, letter \[Alpha]

My house number 4 is "my house" number 4, letter \[Alpha]

respectively (i.e, the first output file the first phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

added missing requirements
Source Link
Alex
  • 351
  • 1
  • 9

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 quotation marks are a very special charactergreek letters that I want to be output in Mathematicatheir \[letter] format. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i, letter α

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1, letter \[Alpha]

My house number 2 is "my house" number 2, letter \[Alpha]

My house number 3 is "my house" number 3, letter \[Alpha]

My house number 4 is "my house" number 4, letter \[Alpha]

respectively (i.e, the first output file the firsfirst phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

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 quotation marks are a very special character in Mathematica. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1

My house number 2 is "my house" number 2

My house number 3 is "my house" number 3

My house number 4 is "my house" number 4

respectively (i.e, the first output file the firs phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

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 greek letters that I want to be output in their \[letter] format. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i, letter α

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1, letter \[Alpha]

My house number 2 is "my house" number 2, letter \[Alpha]

My house number 3 is "my house" number 3, letter \[Alpha]

My house number 4 is "my house" number 4, letter \[Alpha]

respectively (i.e, the first output file the first phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

clearer explanation of the problem
Source Link
Alex
  • 351
  • 1
  • 9

I need to make a bunch of plaintext files, all of which differ only in a single parameter. I was thinking in doing something like this:

For[i,1,10,a="Hello World"<>ToString[i];Export["directory"<>ToString[i]<>".txt",a,"Plaintext"]]

However, the realThe text I want to export presents two difficulties"copy" or "batch produce" is a little bit complex, namely thatsince it contains quotes (") that I would also want to export,quoted areas and greek letters thatquotation marks are a very special character in Mathematica. What I would want changed for theirlike to do is to devise a code version (i.ein which I can input, say,

My house number i is "my house" number i

And, when I writerun from \[Alpha]i=1 in Mathematica it just represents it asto αi=4 output four different plaintext files containing

My house number 1 is "my house" number 1

My house number 2 is "my house" number 2

My house number 3 is "my house" number 3

My house number 4 is "my house" number 4

respectively (i.e, but I want in the exportedfirst output file \[Alpha] to appear)the firs phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

I need to make a bunch of plaintext files, all of which differ only in a single parameter. I was thinking in doing something like this:

For[i,1,10,a="Hello World"<>ToString[i];Export["directory"<>ToString[i]<>".txt",a,"Plaintext"]]

However, the real text I want to export presents two difficulties, namely that it contains quotes (") that I would also want to export, and greek letters that I would want changed for their code version (i.e, when I write \[Alpha] in Mathematica it just represents it as α, but I want in the exported file \[Alpha] to appear).

Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

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 quotation marks are a very special character in Mathematica. What I would like to do is to devise a code in which I can input, say,

My house number i is "my house" number i

And, when run from i=1 to i=4 output four different plaintext files containing

My house number 1 is "my house" number 1

My house number 2 is "my house" number 2

My house number 3 is "my house" number 3

My house number 4 is "my house" number 4

respectively (i.e, the first output file the firs phrase, the second file the second phrase, and so on.)

Jason's advice is very insightful, but I'm having problems with the quotations still. Is there any way I can do what I want to do? If so, how?

Thank you so much for your help

added 64 characters in body
Source Link
Alex
  • 351
  • 1
  • 9
Loading
Source Link
Alex
  • 351
  • 1
  • 9
Loading