kmaster Posted April 1, 2006 Report Share Posted April 1, 2006 Hello. Here is my question. I have a list of names , lets say 100 each on a separate line. I want to take them one at a time and set the variable in a macro that loops until they are all completely added in. Example List: apple orange grape cherry peach Lets say I have a website and I want to create a folder for each of these variables. I want my macro to first grab the text file then read how many lines there are then make a directory for the each line with the text from that line when their are no more lines, then I want my macro to continue. How do I get it to do this??? thanks for the help Quote Link to comment Share on other sites More sharing options...
joe Posted April 1, 2006 Report Share Posted April 1, 2006 Welcome to the group! What you want is fairly simple. Let's say the file of names is called fruit.txt, and it contains what is in your example. Furthermore, we will assume that you are creating folders in c:\temp. The primary commands you need are Text File Process and Create Folder. Do this: // Create folders. Text File Begin Process: "fruit.txt" Create Folder: "c:\temp\%T1%" Text File End Process <REM2:Create folders.><BTFBEG:001:000001:000000:c:\temp\fruit.txt><DOFILE:02:NN:c:\temp\%T1%>><BTFEND> To count line in a file do this: // Count the lines in a file saving results to N1. Variable Set Integer %N1% to 0 Text File Begin Process: "fruit.txt" Variable Modify Integer: Inc (%N1%) Text File End Process <REM2:Count the lines in a file saving results to N1.><IVAR2:01:01:0><BTFBEG:001:000001:000000:c:\temp\fruit.txt><NMVAR:08:01:0:0000001:0:0000000><BTFEND> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.