I have a file cope command in my app when I use the folderBrowserDialog an select a folder it copies the file to rhe wrong dir and add the dir path to the filename i.e \gcmfg\dir testFilename, I have looked aroun and have found nothing hope some one has an idea ,code below.
String folderpath="Null";
FolderBrowserDialog folderBrowserDilog1= new FolderBrowserDialog();
If folderBrowserDialog1.ShowDialog()==DialogResult.OK()
folderpath=folerBrowserDialog1.SelectPath();
MessageBox.Show (folderpath) ; This Shows the path correctly
File.Copy ("C:\\users\gcmfg\\Downloads\\Documents\\65 Cluch Rods.jpg",folderpath+"65 Cluch rod.jpg";
It copies in dir \gcmfg\dir test65cluchrods.jpg when folder select is \gcmfg\dir test.
would appreciate any help.
Thank You
Gene

Sachin SinghRank #66 · 26.2K reputationPosted Jan 19, 2021, 1:40 PM EST
Amit GuptaRank #190 · 12.8K reputationPosted Jan 19, 2021, 2:50 PM EST
Ben ThompsonRank #8,839 · 215 reputationPosted Jan 19, 2021, 4:06 PM EST