Exclamation[Help]SupportMultiDottedExtensions[Solved]

Posts 16–30 of 32 · Page 2 of 3
Quote Originally Posted by Cryptonic View Post
Ok, 1 Problem. It addes the folder name to the files that are to be moved and doesn't move the files...

Heres a pic if you don't know what i'm saying...

Show me the exact code you used.
Quote Originally Posted by Jason View Post


Show me the exact code you used.
[php] Dim newDirectory As String = TextBox2.Text
For Each s As String In OpenFileDialog1.FileNames
Dim fileLoc As String = s
IO.File.Move(fileLoc, newDirectory & IO.Path.GetFileName(fileLoc))
Next[/php]

I had to use openfiledialog, buecause apperently, you can only use open for 1 thing.
Quote Originally Posted by Cryptonic View Post
[php] Dim newDirectory As String = TextBox2.Text
For Each s As String In OpenFileDialog1.FileNames
Dim fileLoc As String = s
IO.File.Move(fileLoc, newDirectory & IO.Path.GetFileName(fileLoc))
Next[/php]

I had to use openfiledialog, buecause apperently, you can only use open for 1 thing.
What was in TextBox2?
Quote Originally Posted by Jason View Post


What was in TextBox2?
The folder location...
Quote Originally Posted by Cryptonic View Post
The folder location...
. I need to know exactly what was in it. Because I tested the code I provided and it worked fine, so I'm guessing it has something to do with the filelocation.
Quote Originally Posted by Jason View Post


. I need to know exactly what was in it. Because I tested the code I provided and it worked fine, so I'm guessing it has something to do with the filelocation.
Its a FolderBrowserDialog and I have a New folder on my desktop and in that folder are 2 files (like in the picture) and theres a folder in that, so i select my 2 files. I put the folder location in the Folder.
Quote Originally Posted by Cryptonic View Post


Its a FolderBrowserDialog and I have a New folder on my desktop and in that folder are 2 files (like in the picture) and theres a folder in that, so i select my 2 files. I put the folder location in the Folder.
Stop answering a question with a general statement and just answer it as I asked it.

What was the contents of TextBox2 at the time when you wanted to move the files?

I don't want anything apart from a straight answer, otherwise I can't help you.
Maybe a missing \?
Ok... well i'll post a pic then...



and in the txtbox

C:\Users\My Username\Desktop\New folder\Folder
Quote Originally Posted by Cryptonic View Post
Ok... well i'll post a pic then...



and in the txtbox

C:\Users\My Username\Desktop\New folder\Folder
Okay try this then:

Code:
Dim newDirectory As String = TextBox2.Text
For each s As String in OpenFile.FileNames
    Dim fileLoc As String = s
    IO.File.Move(fileLoc, IO.Path.Combine(newDirectory, IO.Path.GetFileName(fileLoc)))
Next
Quote Originally Posted by Jason View Post
Dim newDirectory As String = TextBox2.Text
For each s As String in OpenFile.FileNames
Dim fileLoc As String = s
IO.File.Move(fileLoc, IO.Path.Combine(newDirectory, IO.Path.GetFileName(fileLoc)))
Next
Thanks, it works. I guess thats all.
Quote Originally Posted by Cryptonic View Post


Thanks, it works. I guess thats all.
TextBox2.Text was missing the final backslash so when i concatenated the strings, the was no backslash to delimit the file and the folder so it just clumped together. IO.Path.Combine can handle both types of string so I used that instead.
Offtopic:

Lol mnpeepno2, It would be something like this:

Wtf.txt.exe.wtf.goto.hell.son.of.a.bitch.what.the. fuck.why.am.i.doing.this.again?.lol

Ontopic:

I never used a Multidotted Thing, but he is correct, A Example of a *** Real MultiDotted thing is:

(*.Dev.Comp.Load.exe.dll.dnt)

Good Luck Programming
Quote Originally Posted by o0OpurezO0o View Post
Offtopic:

Lol mnpeepno2, It would be something like this:

Wtf.txt.exe.wtf.goto.hell.son.of.a.bitch.what.the. fuck.why.am.i.doing.this.again?.lol

Ontopic:

I never used a Multidotted Thing, but he is correct, A Example of a *** Real MultiDotted thing is:

(*.Dev.Comp.Load.exe.dll.dnt)

Good Luck Programming
Is it just me who does not understand 90% of your posts?
Quote Originally Posted by Blubb1337 View Post
Is it just me who does not understand 90% of your posts?
No, its just you and me !
Posts 16–30 of 32 · Page 2 of 3
This thread is closed for replies.

Tags for this Thread

None

Talk with us