473,766 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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.tx x")

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

Tried:

File.Copy("c:\C ND\dr*.txt", "C:\CND\TestC.t xx", 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
Jul 31 '06 #1
2 4980
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.tx x")

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.tx x")

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

Tried:

File.Copy("c:\C ND\dr*.txt", "C:\CND\TestC.t xx", 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
Aug 1 '06 #2
Works Great. Thanks for the education!!

Hexman

On Tue, 01 Aug 2006 08:48:03 +0200, HKSHK <hk***@gmx.netw rote:
>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.tx x")

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.tx x")

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

Tried:

File.Copy("c:\ CND\dr*.txt", "C:\CND\TestC.t xx", 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
Aug 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5649
by: Ben Kial | last post by:
I need to write a program to "copy" files and preserved the files' atime, mtime, ctime, file permissions. I also need to have this program working in Unix and Windows, where the "Archive" attribute on the file also has to be preserved (any more Windows idiosyncrasies?). Any help will be very much appreciated. Thanks in advance. Ben
1
2360
by: Ralph Noble | last post by:
Any advice from the crowd? Every time I try to run "Copy Database Wizard" I get an error message saying I must be a member of the sysadmin group and have permission to copy files over the network. I'm a local admin on both boxes and a member of the sysadmin group on both SQL servers and an admin on the network. What am I missing here? Thanks, Ralph Noble ralph_noble@hotmail.com
2
5678
by: Sam | last post by:
I would like to put my help files and some other dependencies under source control and have them copy themselves to the Debug and Release paths automatically when the solution is built. .. I have found some posts that mention using custom build actions and makefile projects, but I've never used either and I'm having trouble finding info on them. Please help...... Thanks in advance, Sam
4
1608
by: Don Wash | last post by:
Hi There! I'm using "Copy Project" function of VS.NET to upload my ASP.NET application to my web server (not my own web server) and they have Front Page Server Extensions installed as well. However, when I run the "Copy Project" function, I get this error.... Anybody can help me figure out the problem please?
3
2270
by: rdi | last post by:
The import statements weren't copy/pasted, but everything INSIDE the class WAS copy pasted from the help file. Starting with the myMail.From line and going down to the SmtpMail.Send line, EVERY line results in a "Declaration Expected" error. -- RDI (remove the exclamation from the email address) Imports System.Web Imports System.Web.Mail
1
5634
by: Knepper, Michelle | last post by:
Hi out there, I'm a first-time user of the "Copy ... From..." command, and I'm trying to load a table from a text flat file. http://www.postgresql.org/docs/7.4/static/sql-copy.html I don't know if I'm using the command correctly. Question: I run this command as a superuser, and the "copy from" command is run like a SQL command on the command line, correct?
2
2923
by: Knepper, Michelle | last post by:
Hi, I'm a first-time user of the "Copy ... From..." command, and I'm trying to load a table from a text flat file. http://www.postgresql.org/docs/7.4/static/sql-copy.html I'm getting the following error. Any help will be appreciated. Thank you.
1
1384
by: sck10 | last post by:
Hello I am using Visual Web Developer 2005 Express. Whenever I use the "copy web site" function, it creates a "publishform" button on my task bar that doesn't go away. So if I publish 3 different times, it creates 3 "publishform" buttons. Do I need to re-install the application? -- Thanks in advance,
1
3460
by: Russell Warren | last post by:
I just did a comparison of the copying speed of shutil.copy against the speed of a direct windows copy using os.system. I copied a file that was 1083 KB. I'm very interested to see that the shutil.copy copyfileobj implementation of hacking through the file and writing a new one is significantly faster... any clue as to why this is? I figure I'm missing something here. Does os.system launch a cmd shell every time?
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10009
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9838
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.