I have a bundle of .txt files to process. The files are placed at a specific directory. I have written the code for processing any given file, but I need to automate the selection of each file one by one, until all the files in the directory have been processed.
What code will:
Point to the directory holding the bundle of .txt files.
Identify all the files in that directory (I will manually guarantee that only relevant files are there).
Loop through the identified files (I suppose a list of the files is needed, and a count of the number of files in the list for setting the loop).
For reference, let’s say the .txt files are placed at “C:/Users/me/data/
Previous to responses are better for files specifically, but you might also look at the docs linked above for “string interpolation,” which is how you expand a variable in a string. Eg:
julia> name = "nash"
"nash"
julia> "Hi, $(name)!"
"Hi, nash!"
As I said, you shouldn’t really do that for file paths though, since all the slashes and stuff are tricky to deal with. Much better to use the provided functions