Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TXT file doesn´t close
Message
From
23/10/2015 06:39:24
 
 
To
22/10/2015 08:10:44
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01626227
Message ID:
01626361
Views:
42
>Hello Viv;
>
>The CM.TXT file is the destinetion file.
>
>This error happen when all the file have been added.
>
>Thanks a lot for your time, I really apreciate it....
>
>Best regards;

Looks like the problem is in the use of:
For Each txtfile As FileInfo In topDir.GetFiles("*.txt", SearchOption.AllDirectories)
which would result in the source and destination paths being the same. Your actual directory/file structure is not clear but changing to
For Each txtfile As FileInfo In subDir.GetFiles("*.txt", SearchOption.AllDirectories)
should solve the problem ?

And, as suggested elsewhere you could use:
File.AppendAllText(Path.Combine(topDir.FullName, curFileName), File.ReadAllText(txtfile.FullName))
rather than the StreamReader....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform