Set multiple lines from file.txt to variables and Echo them
Posted: 08 Sep 2010 20:30
Hey,
I am working on a project for the guys at xda-developers. I need help with one part of it, I've been at this part all day and have come up with nothing.
I have a txt file with a variable amount of lines in a certain directory that I want to read each line
(each line has no spaces, just a list of files, ie
com.htc.bookmarks.apk
WifiRouter.apk
*.*
and so on
)
I need to be able to grab all of these lines, store each line in a separate variable (a single letter),
echo something like this:
A. com.htc.bookmarks.apk
B. WifiRouter.apk
C. *.*
and so on
and then I'm going to have:
set /P choice=What Letter?
and depending on what letter they choose, it will delete that file from a certain directory.
So if they choose "A"
it will
del "%CD%\blah\blah\com.htc.bookmarks.apk"
As I'm typing this, I'm realizing that this probably isn't possible lol
Can I get any help?
I am working on a project for the guys at xda-developers. I need help with one part of it, I've been at this part all day and have come up with nothing.
I have a txt file with a variable amount of lines in a certain directory that I want to read each line
(each line has no spaces, just a list of files, ie
com.htc.bookmarks.apk
WifiRouter.apk
*.*
and so on
)
I need to be able to grab all of these lines, store each line in a separate variable (a single letter),
echo something like this:
A. com.htc.bookmarks.apk
B. WifiRouter.apk
C. *.*
and so on
and then I'm going to have:
set /P choice=What Letter?
and depending on what letter they choose, it will delete that file from a certain directory.
So if they choose "A"
it will
del "%CD%\blah\blah\com.htc.bookmarks.apk"
As I'm typing this, I'm realizing that this probably isn't possible lol
Can I get any help?