Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REQUEST simple ex. of Folder filenames to variables
#9
Gintaras, the last post does indeed do precisely what I want in step one of the macro or function. I have REALLY tried ... read ... etc. ... to do the next steps and with no luck SO I will present an additional question(s) to you.

Here is what I REALLY want this function/macro to do:

1) create a variable for every file found in one of my 'pattern' folders

2) create a variable for the file-path for each file in that folder (C:\folder\filename1{cat}.txt)

3) create a variable for the keyword inside the curly brackets for each file in this folder ("cat" from the above example}
(You graciously showed me how to do this for a single file in the post yesterday "How to extrapolate a specific element in a filename")

Example, the macro/function finds the three files in the folder below and generates 9 variables for this

Folder C:\folder\ (has 3 files)

filename1{cat}.txt
filename2{dog}.txt
filename3{cow}.txt

The 9 variables generated would/could be something like:

varForFilepath1 = C:\folder\filename1{cat}.txt
varForFilename1= filename1{cat}.txt
varForKeyword1 = cat
varForFilepath2 = C:\folder\filename2{dog}.txt
varForFilename2= filename2{dog}.txt
varForKeyword2= dog
varForFilepath3 = C:\folder\filename3{cow}.txt
varForFilepath3 = filename3{cow}.txt
varForKeyword3 = cow

THANKS in ADVANCE for any help you provide!!!!!!!!!!!

Kent


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)