Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / August 2006

Tip: Looking for answers? Try searching our database.

How do I copy all text files into one??? eg; Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx")

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hexman - 31 Jul 2006 22:08 GMT
Hello All,

I receive many files with similar content each day.  All I want to do is copy them into one file, then I'll use that file for my processes.  Using
vb2005.   I've tried:

Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx")

That comes back with "File not found".  There are files there!

Tried:  

File.Copy("c:\CND\dr*.txt", "C:\CND\TestC.txx", True)

That failed also.

I've run the Shell command line from the command line in xp and it works as expected.  What am I doing wrong???

Thanks,

Hexman
HKSHK - 01 Aug 2006 07:48 GMT
Hello Hexman,

The "File not found" messages is not related to your text files, but to
"copy" (there is no copy.com or copy.exe; it's in internal Command from
Command.com).

You should use this line instead:
Shell ("cmd /C copy C:\CND\dr*.txt C:\CND\TestC.txx")

Best Regards,

HKSHK

> Hello All,
>
[quoted text clipped - 16 lines]
>
> Hexman
Hexman - 01 Aug 2006 09:09 GMT
Works Great.  Thanks for the education!!

Hexman

>Hello Hexman,
>
[quoted text clipped - 29 lines]
>>
>> Hexman

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.