please help with Moving folders

Hi

I have this code:

My.Computer.FileSystem.MoveDirectory("\\server\kursister$\" & combohvem.SelectedItem & u2 & "\", "\\server\vaerksted$\" & combohvem.SelectedItem & u2 & "_" & dato)

Its working but i only want to move the folders inside \\server\kursister$\" & combohvem.SelectedItem & u2 not the main folder

Hope someone understand and can help

Regards

alvin




Answer this question

please help with Moving folders

  • Solsan

    try:

    Dim theDirectories() as string = Directory.GetDirectories(Path)

    for each currentDir as string in theDirectories

    Directory.Move(currentDir, Destination)

    next



  • n00bie

    Thanks its working

    I change a litte one
    because if i use Directory.Move then i can't move across the Directory

    but if i use

    My.Computer.FileSystem.MoveDirectory then its working

    thanks

    alvin



  • please help with Moving folders