Solved

Open Dir and rename directory

Posted on 2002-03-12
4
752 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

744 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

12 Experts available now in Live!

Get 1:1 Help Now