Okay, so I need to take the first three letters of a file from a list of files, and place this into a text file in a certain manner. I will provide examples below.
Lets say that I have two file names in the same directory, one called cougar.txt and the other bear.txt. These are in the animals directory. I need to take the first three letters of these words, and transpose them into a text file along with the directory, in the following format:
BEA = "animals/bear.txt"
COU = "animals/cougar.txt"
This should happen with any random thing that might be in the list. I'm fairly new to this sort of coding, so I'm not quite sure which language to use, and I'm learning as I go. This new challenge seems fairly daunting to me, and I would be much appreciated if you guys could help.
Also, I'm using Windows 7. Been attempting at this all day, to no avail. Preferably done in batch, but if that is impossible I'm open to recommendations.
Current code: I don't think I'm really getting anywhere xD.
for /F "tokens=*" %%A in (#opm.txt) do set str=%%A set str=%str:~0,3% echo.%str% > #tags.txt pause