I am using saveFileDialog1 and are trying to recognice what path that was selected when "Save" the file. I have begun some code below but are not sure what and if
I will write something after saveFileDialog1-> ?

//Get The Path that was selected when saving the file

String^ GetSelectedPath;

GetSelectedPath = saveFileDialog1-> ?

MessageBox::Show(GetSelectedPath);

Recommended Answers

All 4 Replies

I did found it out:

GetSelectedPath = saveFileDialog1->FileName->ToString();

If I have this path:

std::string path1 = "C:\\File1.txt";

and now want to Copy this File1 to another location and switch name:

std::string path2 = "C:\\Folder\\File2.txt";

So what did happened is that I Copied File1 to another location and also changed the name to File2.
What approach could be used to do something like this ?

If you need to copy a file, you can use System::IO::File::Copy()

Thank you !

If you need to copy a file, you can use System::IO::File::Copy()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.