Hey people, thanks for your help, I've found a weird way around it but it works for now, here's the snippet:
Code:
System::String* path1 = folderBrowserDialog1->SelectedPath->ToString();
System::String* path2 = String::Concat(path1, S"\\", textBox1->Text->ToString());
System::String* pathX = String::Concat(path2, S"\\", textBox1->Text->ToString());
DirectoryInfo* di = Directory::CreateDirectory(path2);
DirectoryInfo* dui = new DirectoryInfo(path1);
FileInfo* fi[] = dui->GetFiles();
Environment::set_CurrentDirectory(path1); Collections::IEnumerator* myEnum = fi->GetEnumerator();
for(int i=0; i < fi->Count; i++)
{
listBox1->Items->Add(fi[i]->ToString());
i++;
}
while (myEnum->MoveNext())
{
FileInfo* fiTemp = __try_cast<FileInfo*>(myEnum->Current);
System::String* XName = myEnum->Current->ToString();
System::String* XProd = String::Concat(pathX, XName);
File::Move(myEnum->Current->ToString(), XProd);
//File::Move(myEnum->Current->ToString(), pathX);
Thanks again for all your help, I don't think I quite explained myself well enough,
Goodnight finally!!
Rob Sitter