|I have a fairly complicated batch file which works fine, except |
I run it from a CD, (READ ONLY) one path is dynamic and
points to a directory on the computer. (This could be any
directory needing repeat checking such as a cache
directory / Drive or Folder name)
So has to be SET depending on which computer it is used
on, and the batch is run on a schedule for a time to run a
scanner to test a directory for malware OR virus.
So on repeat runs, I need it to GET the previously stored PATH
However on the FIRST RUN this file does not exist and need a simple
prompt for the path, so I want my Batch file to ask for USER INPUT
i.e. (get path) then store this PATH in C:\batch\my-path.txt
Future repeat runs of the BATCH file then gets this path
from C:\batch\my-path.txt and stores it in a variable such as
I have no problem using a choice menu to delete or reset this
file in the event a new path needs to be set, I just don't know
how to get user input and store it in C:\batch\my-path.txt
and how to input it as a variable for the path to scan?
I have checked many other posts on here but could not find
anything suitable for my needs.
Any idea's please ?