Good day. tell me how to implement a batch file had not worked. Batch file checks for the presence of the two files (2 txt file - 123.txt and 321.txt) to the C drive, after checking if they are, then remove them
Asked
Active
Viewed 46 times
1 Answers
0
You can directly delete them without checking:
del /q /f "c:\123.txt" "c:\321.txt" 2>nul
If you want checking anyway:
if exist "c:\123.txt" del /q /f "c:\123.txt"
if exist "c:\321.txt" del /q /f "c:\321.txt"

npocmaka
- 55,367
- 18
- 148
- 187
-
Many thanks! even if the prompt is not difficult. Next, after the removal of these files, the script must be downloaded from the Internet 123.txt Andes 321.txt and throw them on the C drive, any hosting. – becauseq Nov 01 '15 at 16:16
-
@BecauseBecause - so you have troubles with internet downloadin? – npocmaka Nov 01 '15 at 16:18
-
2take a look at [this](http://stackoverflow.com/questions/28143160/how-can-i-download-a-file-with-batch-file-without-using-any-external-tools) – npocmaka Nov 01 '15 at 16:20
-
@npocmaka, all these years and I never knew that command existed. I scroll right by it on SS64 website just about every day. Banging me head!!! – Squashman Nov 01 '15 at 19:57