User forums > Help

Open filename on command line

(1/1)

Pecan:
Can someone tell this thick headed self how to open a file on the command line:

I've tried "codeblocks.exe c:\this.is.a.file"
and
"codeblocks.exe --file=c:\this.is.a.file"

neither works for me.


svn build  rev 9936 (2014-10-10 14:00:08)   gcc 4.6.1 Windows/unicode - 32 bit

stahta01:
This almost worked for me.


--- Code: ---codeblocks.exe --file="C:\Temp\this.is.a.file"

--- End code ---

It got a CB error of
---------------------------
Error
---------------------------
Could not open file C:\Temp\this.is.a.file,
because no extension handler could be found.
---------------------------
OK  
---------------------------

I get the same error with this.

--- Code: ---codeblocks.exe --file=C:\Temp\this.is.a.file

--- End code ---

Windows 7 32 bit.

Added c file extension and this command worked on opening it in CB


--- Code: ---codeblocks.exe --file=C:\Temp\this.is.a.file.c

--- End code ---


Tim S.

scarphin:
Maybe the file extension should be inserted to cb's extension handler to point to the internal editor? Just a guess!

Pecan:
Reading the code(thanks for the hint staht01), CB will only handle certain extentions for which it has handler to open the files.

I circumvented the code with a personal hack, and am happy I can use CB for a generalized editor now.

MortenMacFly:
Well a proper solution would be to show the same dialog we do show in case you open a file without extension handler from the file open dialog.

Navigation

[0] Message Index

Go to full version