Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TXT file doesn´t close
Message
De
23/10/2015 06:39:24
 
 
À
22/10/2015 08:10:44
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01626227
Message ID:
01626361
Vues:
41
>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....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform