0

I was attempting to display the contents of a file if the user type /d for the first argument of my command.

However all it would display is 'The system cannot find the file specified. Data:'

Using 'set "_path=%~dp0"' in my other batch files worked but not here, why, and how do I fix it?

@echo off
if "%1"=="/d" (
     set "_path=%~dp0"
     set data_txt=<%_path%user.txt
     echo Data: %data_txt%
)
Zeeen
  • 192
  • 1
  • 12

0 Answers0