Ajouter un commentaire

wiss20000

j'ai céer un fichier .bat qui contient
copy test.txt C:\dossier
et j'ai écri ce moceau de code en java

	//--lancer le .bat
		String[] cmd = new String[3];
		cmd[0] = "cmd.exe" ;
		cmd[1] = "/C" ;
		cmd[2] = "C:\\test.bat"; // 2 backslash ! :-)
		Runtime rt = Runtime.getRuntime();
		final Process process = rt.exec(cmd);
		InputStream st= process.getInputStream();

mais rien ne ce passe (le fichier n'est pas copié) :!: :!:

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 ZZZZZ  PPPP   EEEE   AA   M   M 
Z P P E A A MM MM
Z PPPP EEE AAAA M M M
Z P E A A M M
ZZZZZ P EEEE A A M M