Using MS-DOS Commands Within Java App to Create Files
Posted on 2013-01-23
I am using the Runtime.getRuntime().exec() method to run MS-DOS commands to, for example, create files. One example is to execute “dir *abc* /s /b > abc.txt” to create a text file containing the full path names of every file whose filename contains the characters “abc”.
After the successful execution of that command, the Java app does not know that the new file, abc.txt, exists.
Is there something else that must be done to let Java know that this file exists?