QbicSquid
QbicSquid

Reputation: 175

"The system couldn't find the path specified" batch file error

I'm new to batch file scripting language and im trying to make a bat file that saves some data for me.butwhen i try to use the command:

    echo 500>"%~dp0save\%user%-%pass%\power.sav"

this error occurs: The system cannot find the path specified. i need a solution quick.

Upvotes: 0

Views: 560

Answers (1)

Stephan
Stephan

Reputation: 56155

create the directory before writing to it:

md "%~dp0save\%user%-%pass%\ 2>nul

Upvotes: 1

Related Questions