English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Heres the command-"for /f %i in (c:\Deletes.txt) do @erase %i"But when in a batch file does nothin when in command prompt it deletes files in the Deletes.txt.Anyone know,Thanks

2007-01-13 23:13:52 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

Variables in a Batch File need to use two % signs, whereas the command-line only needs one.

eg.
for /f %%i in (C:\Deletes.txt) do @erase %%i

2007-01-13 23:41:42 · answer #1 · answered by Kookiemon 6 · 0 0

From what I know you can not access another file while you are running a batch file. Maybe you need a command to somehow merge the Deletes.txt entries into the batch file. Try looking for a batch command to read/ open the Deletes.txt file.

2007-01-13 23:21:42 · answer #2 · answered by Alexandros 3 · 0 0

you need to either change the Path statement to include the directory of your batch files/scrips or do a CD in the batch file to the location of the executable that u are using in the batch file

2007-01-13 23:20:28 · answer #3 · answered by lv_consultant 7 · 0 0

It relies upon at this gadget, i do no longer understand approximately fortran, yet in C++ i could the two write a short loop to maintain it open some seconds, or do a cin (enter), so as that this gadget waited for enter to close the window. sturdy good fortune Eric

2016-12-12 11:05:08 · answer #4 · answered by Anonymous · 0 0

Do you get any error message when the batch file runs?

Check your permissions. chmod go+x filename.txt should work.

2007-01-13 23:17:37 · answer #5 · answered by Darren M 1 · 0 0

fedest.com, questions and answers