Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stephanschulz/a58e65c3f597a7292a3c150b92aa669e to your computer and use it in GitHub Desktop.
Save stephanschulz/a58e65c3f597a7292a3c150b92aa669e to your computer and use it in GitHub Desktop.
mount remote computer and copy file via OF
char myScript[255];
sprintf(myScript, "osascript -e 'try' -e 'mount volume \"smb://10.111.222.5/admin/Desktop\" as user name \"admin\" with password \"hemmer\"' -e 'end try'");
std::system(myScript);
ofFile file;
string toPath = "/Volumes/Desktop";
string fromPath = ofToDataPath("2016.mov");
ofLog()<<"from: "<<fromPath;
ofLog()<<"to: "<<toPath;
file.copyFromTo(fromPath, toPath,false,true);
file.close();
std::exit(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment