This is my first post and I am not very skilled with batch so sorry if I really mess up.
Basically I'm working on a little batch script where once run, the user inputs a file path and line number and the specified line of the specified file will be output to the command line. I have all my variables and commands working, and the command to specify the line of the text file works fine, its just when I put my variables in it doesn't work. Now I'm guessing what I'm doing is obviously wrong since I'm new to batch, but anyway here's my code:
@echo off    
color b      
:top     
title specified line copy tool    
echo input full path to txt file    
set /P filepath=">"    
cls    
echo what line would you like to copy?    
set /P lineoriginal=">"    
set /A actualline=%lineoriginal%-1   
for /F "skip=%actualline% delims=" %%i in (%filepath%) do if not defined output     set "output=%%i"    
echo %output%    
pause  
See if you can see what I did wrong, thanks.