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 for Programming
 Forum for Origin C
 Working with network files

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
szailer Posted - 07/30/2009 : 3:15:39 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5/ SR 0
Operating System: Window XP

I work with a network drive to store all my projects. Sometimes Origin crashes when it tries to save to this network drive. Can somebody help me to write a C code to copy the current project to a temp folder on the local machine, save the work there and when I close the file, uploads the new version back to the network drive?

Thanks

Tamas Szailer
1   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 07/31/2009 : 05:30:21 AM
HI,

See the following example:

void _access_network()
{
	string strNetwork = "\\\\qa\\shared\\iris\\FileImport.txt";
	if(!strNetwork.IsFile())
    {
        out_str("No FileImport.txt found");
        return;
    }

	string strLocal = "C:\\" + GetFileName(strNetwork);
	
	bool bFailIfExist = false; // overwrites if the file existed
	CopyFile(strNetwork, strLocal, bFailIfExist); // copy FileImport.txt from \\qa computer shared\iris folder to local c drive
}


And there are many other File relative functions in Origin C, see http://ocwiki.originlab.com/index.php?title=Category:File_Management_%28global_function%29

Iris

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