PDA

Click to See Complete Forum and Search --> : Command()


James-R
Jun 1st, 2007, 06:12 AM
Hi,

I have written an application for my pocket pc. I have setup a file associate which is suppose to execute the program when the file is opened.

This works, but whenever I try to use Command() to get the name of the file that was opened I get a NotSupportedException error.

Command() works in the standard .net framework 2 but not in .net cf 2.

What am i doing wrong? is there an alternative method?

Thanks,
James

petevick
Jun 3rd, 2007, 02:13 AM
Hi,
not knowing how to use it, what exactly are you doing?

Cheers

Pete

James-R
Jun 3rd, 2007, 02:36 AM
For example, on your computer if your open a word document on you C drive, lets call it test.

Command() = "C:\test.doc"

The command() is the path of the file that was opened

Shaggy Hiker
Jun 3rd, 2007, 10:15 PM
Even if that was in the full version, I think it might be archaic. There is an entire class that gets you various parts like that.

Look at the FileInfo class in System.IO. You might also want to look at the Directory and File classes, though they don't actually have the members you are looking for. I think you want FileInfo.DirectoryName(), but there are lots of things in that class.