Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


250 points : can I copy and save a file on another directory using VB?

Posted on 2003-03-19
Medium Priority
Last Modified: 2010-05-01
Question by:lesultan
1 Comment
LVL 38

Accepted Solution

PaulHews earned 80 total points
ID: 8170342
To copy a file from one folder to another:

FileCopy "C:\temp\x.txt", "C:\temp2\x.txt"

To move a file from one folder to another:

Name "C:\temp\x.txt" As "C:\temp2\x.txt"

For both commands, the first filename is the source and the second filename is the target.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

572 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