Solved i need to edit text

May 5, 2012 at 02:43:05
Specs: Windows XP
hi i am creating a .bat file that uses the for /f command to read the text from a file in the same folder using this code

for /f %%a in (savelevel.txt) do set %%a

however i also edit the text in that file using the same.bat using this code

echo level=%level% >savelevel.txt

however this only works for files in the same folder as the .bat file but i need it to read and edit text from a different folder how do i do this

See More: i need to edit text

Report •

May 5, 2012 at 05:14:26
✔ Best Answer
just add the path.

for /f %%a in (c:\dosfolder\savelevel.txt) do set %%a

echo level=%level% >c:\dosfolder\savelevel.txt

where %dosfolder% is your path


Report •
Related Solutions

Ask Question