Well, I figure it would be quicker to delete the folder and recreate it rather than delete 17 or so files.
And as soon as I saw your reply I realized I forgot to put my code in a code box.
I guess it won't take too much extra time to delete each file individually.
I've managed to learn how to delete a directory.
Dim objDirectory AsNew DirectoryInfo("c:\data\WrongDate")
'If the directory WrongDate exists it gets deleted and recreated.
'This ensures files from the previous day are not in the directory.
If objDirectory.Exists Then
objDirectory.Delete()...
I see Output which is where I have been seeing the output from the Console.WriteLine command. I also see tabs labeled Task List, Index Result, and Command Window (which I activated the way you said) when I click on that tab then I see Command Window - Immediate. The only other one for me to...
Thanks. I started using lastwritetime after I posted here, which does give the correct date and time but I just don't see why it would work the way it does when the file is a different file and when I view it in windows explorer I see the correct date but VB does not see that for the...
Thank you both. I like the Debug method as it is similar to something I do when writing stored procedures. The part about highlighting and pointing sounds good too then I wouldn't even need extra lines of code. My best guess as to where the locals window is, is that would be where I see all...
The following code works great the first time I run it.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FileNames(New DirectoryInfo("c:\data"))
End Sub
Sub FileNames(ByVal dir As DirectoryInfo)
Dim objFile As FileInfo...
Well, I finally saw where Console.WriteLine displays text to and from that I was able to see that the code is not working in VB.NET the way I expected.
How can I modify the code I originally posted to display the results in the form?
I have tried adding code such as Console.WriteLine("Hello") but never see it on the form or where ever it is supposed to show up. Or is it also not showing up due to the same problem I have with the pop up's...
I joined here yesterday and have been having trouble staying logged in. I try posting a reply and I get the screen saying I don't have permissions or that I need to log in. When I log in again it doesn't seem to accept my log in.
Is there a time out setting that I can change so that I stay...
Or would the problem also go away if we upgrade to .NET 2.0?
I don't know if my work will let me learn a lot of VB.NET and so that is the reason my priority is not to get the problem fixed but to work around it.
Thanks again everyone. I like this forum but am having troubles staying...
Thanks for your help.
My guess would be I am compiling it or doing something else wrong because I really don't know much about the development environment for VB.NET. At first I couldn't even get anything to run when I hit start it just complained that there was no file or something. I...
I am using Windows XP Professional Service Pack 2. I tried changing the directory and still saw the same problem.
You mean the code actually works for you?!
This is my first post here and I am hoping I have posted in the right place.
I know almost nothing about VB.NET but am trying to test some code I developed based off of examples I found. The code is supposed to give me all the file names and create dates for the files in a specific directory...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.