|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I copy all text files into one??? eg; Shell("copy c:\CND\dr*.txt C:\CND\TestC.txx")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 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 Hexman wrote: Show quoteHide quote > 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 Works Great. Thanks for the education!!
Hexman On Tue, 01 Aug 2006 08:48:03 +0200, HKSHK <hk***@gmx.net> wrote: Show quoteHide quote >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 > >Hexman wrote: >> 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
Auto Increment Version in VB 2005
Transparent backcolor SqlDataAdapter Questions Thread safe TextWriter question Problem with System.IO.File.Move and Catching Exceptions onRollBack event Creating ToolWindows with .NET in VBE Select node Frame control is gobbling up my Listbox saving documents in sql2005 using vb.net |
|||||||||||||||||||||||