Solved

Open Dir and rename directory

Posted on 2002-03-12
4
760 Views
Last Modified: 2007-11-27
Hey all, I’m looking for some code that I can run as a VB script or VB application to open a directory E.g. C:\windows>adnew, Copy a file to this Dir (C:\windows>adnew) and then Rename the Directory.
I don’t know much about VB so any help will do.

0
Comment
Question by:dagga007
4 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 50 total points
ID: 6857078
You will need two VB statements:
Filecopy
Name

Use the VB online help to see syntax and examples.

There is no need to "open a directory".
0
 
LVL 6

Expert Comment

by:ebosscher
ID: 6858014
Here's a link to the FileSystemObject.  I know there are probably VB intrensic objects to do that type of stuff, but I find working with FSO to be the easiest way to deal with files and directories

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/fsooriscriptingrun-timereference.asp


Hope that helps
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7618231
Hi dagga007,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept aikimark's comment(s) as an answer.

dagga007, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7665643
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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 In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

830 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