C
C#2y ago
Core Dream

❔ VB to C# for Moving all folders and files?

Is there a way to do this in C# without relying on Microsoft.VisualBasic.FileIO? Thank you.
Sub MoveAllItems(ByVal fromPath As String, ByVal toPath As String)
My.Computer.FileSystem.CopyDirectory(fromPath, toPath, True)
'Here we want to not recycle the files since the files are moved
My.Computer.FileSystem.DeleteDirectory(fromPath, FileIO.DeleteDirectoryOption.DeleteAllContents)
End Sub
Sub MoveAllItems(ByVal fromPath As String, ByVal toPath As String)
My.Computer.FileSystem.CopyDirectory(fromPath, toPath, True)
'Here we want to not recycle the files since the files are moved
My.Computer.FileSystem.DeleteDirectory(fromPath, FileIO.DeleteDirectoryOption.DeleteAllContents)
End Sub
3 Replies
Core Dream
Core DreamOP2y ago
ty
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server