can i execute some dos like command from flex just like attrib c:\a.txt -h.
function available in c exec(), in java Runtime.getRuntime().exec(). but in flex is there any available?
can i execute some dos like command from flex just like attrib c:\a.txt -h.
function available in c exec(), in java Runtime.getRuntime().exec(). but in flex is there any available?
I think the closest you're going to come to achieving this is by using fscommand(), which has quite a few limitations.
Remember that Flex applications run in the Flash player (usually within a browser) and thus don't typically have access to shell commands of the host filesystem.
Two of the most requested features for Adobe AIR have been the ability to launch native executables from an AIR application, and the ability to integrate native libraries into an AIR application. Unfortunately, neither feature will be included in Adobe AIR 1.0.
But there is a workaround. It's a bit complicated, yet elegant, and should solve your problem. It relies on CommandProxy, a kit for proxying calls between applications and the operating system. You will find here a detailed article on how to implement this solution
If you want to run batch files using flex..then do the following
var file:File =new File(path to batch file)
//do not give the .bat extension only file name is reqiured.
file.openWithDefaultApplication();
// the batch file will open and run the dos commands you have written