Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7602 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hey,

I stumbled across something pretty neat today. It may not be news to everyone, but I found it useful, so thought I'd pass it on.

If you use the Send Message script step you can print to or execute external programs. Everyone knows that. But you can also issue DOS command line commands too. (Remember DOS?) Send the message

command /c your command line message

or

command /k your command line message

The first version closes the DOS window when its finished. The second will keep it open. If you uncheck the 'bring application to front' option it is barely visible to the user. cmd /c your command will also work for NT, 2000, and xp, but I'd suggest command so as to be backward compatible with 95, 98, and ME. So

command /c dir c:>Directory.txt

will list all of the files in c: and send them to the file c:Directory.txt. You can then easily import this back into FM and manipulate it as you like. I'm thinking of all sorts of ways to move data around, create directories, check system variables, etc.

Hope someone finds this useful. I think I'll brush up on DOS.

Dan

Posted

That is pretty neat.

It appears in Win2000 there is a difference between running the "cmd" command and "command."

Command will start the actual "DOS" program. Where cmd seems to just bring up a command console.

Does anyone know the difference?

Posted

cmd is 32 bit, where as command is the older 16 bit.

Yes, this is a very useful trick. With it, you can create directories, delete files and directories, make use of command line tools (retrievieving results via an import of the output file), etc. You could also write a command line email tool that sends html formatted email. The only limitation is that the cmd line only accepts input parameters up to 2k in size (I think). There are various books on shell scripting which can help you explore the potential here further. Good luck! smile.gif

Posted

Hi Dan!

laugh.gif Nice one!

I have been using similar concept on win "Expolorer" with OpenURL script to bring eg. silentyl-exported CSV files to users without having them to browse over the LAN or even know where the files are exported....it is nice since some users don't like to browse to serversharenamefoldersubexportsfile and also u dont have to have your users map network drives to EVERY little folder

of interest!

Anyhow, thanx for sharing!

This topic is 7602 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.