Solved

Simple File Operations

Posted on 1998-06-02
6
183 Views
Last Modified: 2010-05-03
Simple question.  I remember back in the days of DOS when you could simple type "file1+file2+...+file(n) = FILE(1 to n)" to copy a bunch of files into one combined file.  Being new to Visual Basic I was wondering if a similar funtion or command exits.  Thanks.
0
Comment
Question by:unknowing
  • 3
  • 2
6 Comments
 
LVL 1

Accepted Solution

by:
tstrob earned 50 total points
ID: 1462304
Just use this simple DOS-Command within the shellcommand of VisualBasic:

shell("copy file1....")

0
 

Author Comment

by:unknowing
ID: 1462305
If you use the vbHide option, you won't see the DOS box.

shell("copy file1....", vbHide)
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1462306
shell("copy file1+file2+file3 filedest", vbHide)

Would append file2 and file3 to file1 and copy into filedest.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 6

Expert Comment

by:clifABB
ID: 1462307
Excuse my ignorance, but if I have 3 files then all I have to do to combine them is to type:

shell("file1+file2+file3 FILE(1 to 4)", vbHide)

Is that it?  Can you recommend any good material on this 'shell'?
Thanks.
0
 

Author Comment

by:unknowing
ID: 1462308
Thanks alot clifABB!  
0
 

Author Comment

by:unknowing
ID: 1462309
With shell-command you can start any action, that is available from DOS-prompt
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question