DOS Commands

Thales750

Formerly Jsanders
Local time
Today, 04:10
Joined
Dec 20, 2007
Messages
3,610
Are more or less all of the DOS functions available through VBA?
I need to make directories, copy and rename files etc.

Thanks,
 
i was just looking at this recently for the first time. i *think* you have to use Shell command. check back for other replies and search for DOS, Shell, (command) prompt, etc.
 
In VBA you have ...

MkDir - make a directory
RmDir - remove a directory
FileCopy - copy a file
Name - rename a file
Kill - delete a file
SetAttr - set a file attribute

Dir - "list" your directory (read the help on this to explain what it does)
GetAttr - retrieve file attribut info
CurDir - returns the currrent directory
Environ - returns os level environ variables
FileLen - to return the size of a file ...

.....

I am sure there are more statements or functions that sort of emmulate DOS.
 
I recently changed from a lot of batch files to VBA. I did this to get around having to put extra files on people's computers.

Most of mine all involved copy, date/time stamping, delete etc.

You can also use VBA to mkae batch files.
 

Users who are viewing this thread

Back
Top Bottom