Solved

Simple File Operations

Posted on 1998-06-02
6
178 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA loop through headers using value 3 57
Macro: print each sheet to pdf using ExportAsFixedFormat 11 41
How does CurrentUser work? 10 31
TT Auto Dashboard 13 85
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

867 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

16 Experts available now in Live!

Get 1:1 Help Now