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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Working with network files
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

szailer

USA
10 Posts

Posted - 07/30/2009 :  3:15:39 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Iris_Bai

China
Posts

Posted - 07/31/2009 :  05:30:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000