?
Solved

Open Dir and rename directory

Posted on 2002-03-12
4
Medium Priority
?
792 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 46

Accepted Solution

by:
aikimark earned 200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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

839 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