Solved

Simple File Operations

Posted on 1998-06-02
6
171 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now