I am new to the Mac so I am learning how to do some of the things I did in Windows. I have a directory that has two folders. The first folder contains a list of pdf files which represent printed pages. The second folder contains multiple file types (pdf,txt and doc) which have corresponding names to the earlier folder. The second folder contains some additional files that I do not need to deal with.
Here is what I need to do: For each file in folder 1, I need to find the txt file in folder 2 that has the same name with a txt extension. From that point, I will import the file into excel, do some parsing, then move to the next file. I need to do this until all files have been found.
I am using the following to have the user determine the folder for the first folder. I can do the same thing with a different name for the second folder.
Dim filePath as string
filePath = MacScript("choose folder as string")
This will let me choose a folder. I have tried the DIR() function. I was looking for a filePath & "*.txt" but not getting any value.
I haven't found many things that are not available on the Mac that were available on Windows so I am hoping I can do this also. The problem with this process is that the user could need to loop through up to 50 files. It is taking users several hours to complete this process. I have done this for a single file and it works famously (MacScript("choose file as string").
I would be extremely grateful for any assistance on this.
Here is what I need to do: For each file in folder 1, I need to find the txt file in folder 2 that has the same name with a txt extension. From that point, I will import the file into excel, do some parsing, then move to the next file. I need to do this until all files have been found.
I am using the following to have the user determine the folder for the first folder. I can do the same thing with a different name for the second folder.
Dim filePath as string
filePath = MacScript("choose folder as string")
This will let me choose a folder. I have tried the DIR() function. I was looking for a filePath & "*.txt" but not getting any value.
I haven't found many things that are not available on the Mac that were available on Windows so I am hoping I can do this also. The problem with this process is that the user could need to loop through up to 50 files. It is taking users several hours to complete this process. I have done this for a single file and it works famously (MacScript("choose file as string").
I would be extremely grateful for any assistance on this.