The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 .OPJ extension in capitals

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
schalkbe Posted - 01/05/2005 : 09:16:25 AM
Origin Version (Select Help-->About Origin): OriginPro 7.5 SR5
Operating System: Windows XP

Is there any way to bring back Origin's old behaviour of allowing a .OPJ extension (in capitals) to its project files?

Since version 7.5 Origin converts the old file name XYZ.OPJ to XYZ.opj when I edit and save an existing project.
For some reason I had the habit of saving my Origin Projects with .OPJ in capitals.
Most of them are part of a CVS repository (CVS is a version control system). Since CVS is case-sensitive, I run into problems when the .OPJ changes to .opj in my local copy. The only fix I found up to now is manually changing the CVS repository on the server and additionally some control files on the local working copy. This of course takes a lot of time - and I still have a lot of .OPJs in my repository.

Therefore the question: Why does the newest Origin force .opj in lower case letters? Can it be changed back to its tolerant old behaviour?

6   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 02/05/2005 : 2:23:59 PM
Hi Bernhard,

FYI, I don't think you need it now but the File Exchange has a new button which provides full control over the case of the OPJ extension.

http://www.originlab.com/FileExchange/details.aspx?fid=95

...Project is saved in Origin C and test.abc.opj is handled ok.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/05/2005 2:32:27 PM
schalkbe Posted - 02/02/2005 : 08:12:37 AM
Just an additional note for all those who name their files as weird as I do:

If you use file names with dots (like test.abc.opj), you have to change Mikes code above to:

string FindExtension(string strFile)
{
int numDots;
string strExt;
WIN32_FIND_DATAA find;
HANDLE hFile;
if((hFile=FindFirstFile(strFile,&find)) != INVALID_HANDLE_VALUE)
{
strFile = find.cFileName;
numDots = strFile.GetNumTokens('.')-1;
strExt = strFile.GetToken(numDots,'.');
}
return strExt;
}


Otherwise a file named test.abc.opj gets test.abc.abc.opj when you save it next time and so on.

Edited by - schalkbe on 02/02/2005 08:14:42 AM
schalkbe Posted - 01/10/2005 : 04:24:24 AM
Thank you, Mike!
Now my problem is solved. Great!

Bernhard

Mike Buess Posted - 01/07/2005 : 5:36:18 PM
You can force the Save command to use OPJ rather than opj...

1. Press both the Shift and Control keys and click Origin's Save Project button or select File->Save Project. This will open File.ogs in CodeBuilder and place the cursor at the SaveProject section.

2. Locate the command "save;" and change it to "save %X%G.OPJ;". (Don't include the quotation marks.)

3. Save File.ogs and close CodeBuilder.

If you ever decide to switch to lower case extensions don't forget to change the command to "save %X%G.opj;".

...The more general goal of preserving existing extensions (e.g., your colleagues') can be accomplished with the use of the following Origin C function.
string FindExtension(string strFile)
{
string strExt;
WIN32_FIND_DATAA find;
HANDLE hFile;
if((hFile=FindFirstFile(strFile,&find)) != INVALID_HANDLE_VALUE)
{
strFile = find.cFileName;
strExt = strFile.GetToken(1,'.');
}
return strExt;
}
Use that to find the current extension (upper or lower case) and save appropriately...

%A=findExtension(%X%G.opj)$;
save %X%G.%A;

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/08/2005 07:28:41 AM

Edited by - Mike Buess on 01/08/2005 09:48:08 AM
schalkbe Posted - 01/07/2005 : 07:17:33 AM
Thank you Scott and Laurie for your help.
Your suggestions solve my problem for the most part.

Unfortunately the following happens:
- I create a new Project, save it as test.OPJ, so I get a file test.OPJ on my disk. Fine.
- I open the project, modify it, and save it. The file name is changed to test.opj.
- The only way to avoid this is ALWAYS using Save As and adding .OPJ to the file name.

Changing the default to .OPJ on my computer doses not really help, since I share the CVS repository with colleagues. If the check in a xyz.opj, and I check it out, open it, modify it, and save it, it is now xyz.OPJ (since I modified my Origin.ini), and I run into problems again.

Everything would be fine, if Origin remembered the case of the extension a project has when it opens it, and used the extension with the same case for saving. But I fear this can not be done easily by modifying Origin.ini...

Thank you for your help,
Bernhard Schalk

Laurie Posted - 01/05/2005 : 5:31:40 PM
Hi Bernhard,

This change was made during the beta testing of Origin 7.5 per the request of one of our beta testers. He backed up files on UNIX and said that it would be easier for him if all Origin extentions be written in lower case letters. At the time, we thought reasonable to make the change as the default.

As Scott points out, you can easily control this by modifying the [FileExt] section of the origin.ini file.

Thank you,
Laurie

OriginLab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000