Declare a variable with the contents of a file

0

In my batch script I am having the user enter a location to copy files using copy con location.tmp , I want to save the content of location.tmp , I have tried with set /a instdir=location.tmp and set instdir=location.tmp but I can not get it

EDIT: I already found the solution by myself but thanks for your help

    
asked by Tau 13.04.2018 в 22:39
source

1 answer

0

Try entering this:

set /p instdir=Carpeta:     
echo %instdir% > location.tmp
    
answered by 13.04.2018 в 23:20