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

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

Recommended Posts

Posted

Don't have a conclusive answer on this one, but maybe to help you on the way of getting there:

You can 'pipe' the outcome of DOS command into files. For example: in order to know the name with which the user has logged into Windows, you can do a send message that says:

echo %username% > username.txt

it will not give the result on the screen, but will write the username into that textfile, that you then can import into FM.

What I can't capture so far, is an error message.

dir *.* > dir.txt

works fine, creates a listing of all files, but if I make it

dir *.fp7 > dir.txt

whilst there are no .fp7 files in the current directory it will return on the terminal 'file not found' and write in the text file only the label and number of the harddisk as well as the current directory.

Maybe you can work around it by drawing a conclusion from a negative: if you execute a certain DOS command but it fails, then you can conclude from the fact that your text file does NOT contain a certain string that there was an error.

Posted

thanks for the reply.. i was able to work around what i wanted to do, though.. basically what i was doing was writing the username to a text file and importing that text file. I wanted to use the error capture to make sure it wrote to the file. because if the file already exsisted and was read only, it wouldn't write to the file, and it would just import whatever was in the file.

I got around it, but running two dos commands before running the commands to create the text file:

attrib user.fmz -r -a -s -h

del user.fmz

(user.fmz being the name of the file i created. i figure fmz was a good extension that no one else would use. LOL)

This topic is 7152 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.