views:

523

answers:

1

Can we run command prompt commands (like copy, rename etc) from an AIR or flex application? I thought of creating a bat file and running it using fscommand, but that does`nt serve my purpose.

A: 

There is Command-line integration in AIR 2.0, very cool! But you can only use it with AIR 2.0.

If you want to run it via AIR < 2 or Flex, you could easily use a server-side script like ruby/php/python to execute commands. Just send the command over HTTP via XML (using HTTPService for example), and handle it in the native language (ruby/python, etc.). There's all kinds of stuff to do this, but it's complicated to get going with.

If you don't want anything but Flex/AIR, you can only use AIR 2.0. AIR 2.0 Beta 2 was released yesterday :). Here's a good tutorial on it, making a native-integrated media player with AIR 2.0 beta.

Let me know how that works out.

viatropos
Thankyou very much. it really helped me a lot. I was easily able to launch and execute the commands i needed.
Neo
nice, I have to try out AIR 2.0 soon too :)
viatropos