automatische eingabe in C
-
Wenn ich folgenden befehl hab:
#include <stdio.h> int main(int argc, char *argv[]) { system("rmdir /s c:\\test"); }
kommt in der cmd ja die abfrage [J/N].
Gibt es eine möglichkeit dass diese nicht kommt und der ordner trotzdem gelöscht wird auch wenn er unterordner hat?
-
Ich habs nicht ausprobiert, aber probier doch mal
#include <iostream> #include <fstream> ... ostream tmp("uml.tmp", ios::out ); tmp << 'J'; endl(tmp); tmp.close(); system("rmdir /s c:\\test < uml.tmp");
System ist unschön und langsam
!!
lua J I T
-
hm funktioniert nich.
gibts denn ne andere möglichkeit ordner mit inhalt zu löschen?
-
Ich nehm immer
rd /s /q c:\test
-
funktioniert iwie auch nich so wies soll.
-
Milla schrieb:
funktioniert iwie auch nich so wies soll.
Doch.
-
Versuch es doch mal mit "rmdir /?"
Ansonsten gibts da was ziemlich cooles:
std::remove aus cstdio