|
Search:
Advanced search
|
Browse by category:
|
Glossary | Contact Us |
How do I run an internal DOS command from within Access Basic, if I try x=Shell("copy file1 file2",1) I get a message "File not found". |
||||
DOS internal commands are processed by the command processor shell so you should be calling this program and not trying to execute the internal command itself.
The command processor is usually command.com but this can vary and so can it's location (indeed it can even reside outside of the dos search path) for this reason it's not a good idea to hard code it's location or name into an application as this may change if the application is moved to another pc. Use the Environ function to retrieve the %COMSPEC% environment variable as this always points to the current command processor shell. e.g. Dim hTask As Integer hTask = Shell(Environ("COMSPEC") & " /C COPY file1 file2", 1) Note: Some of the DOS internal commands are available in Access Basic (in the long form of the command), e.g. RmDir, ChDir, MkDir. The Dir command can be emulated using the Dir() function although this only returns files, not hidden/system files or directory names. |
||||
Comments
|
31 Dec, 1969
|
Guest
|
|
databases |
|
31 Dec, 1969
|
Guest
|
|
data base |
|
31 Dec, 1969
|
Guest
|
|
cloud database |
|
31 Dec, 1969
|
Guest
|
|
access database templates |
|
31 Dec, 1969
|
Guest
|
|
dbms copy |
|
31 Dec, 1969
|
Guest
|
|
sql dbms |
|
31 Dec, 1969
|
Guest
|
|
database |
|
31 Dec, 1969
|
Guest
|
|
dbms market share |
|
31 Dec, 1969
|
Guest
|
|
database system |
|
31 Dec, 1969
|
Guest
|
|
dbms |
|
31 Dec, 1969
|
Guest
|
|
database tools |
|
31 Dec, 1969
|
Guest
|
|
sql server 2005 training |
|
31 Dec, 1969
|
Guest
|
|
sql server 2008 |
|
31 Dec, 1969
|
Guest
|
|
scientific article database |
|
31 Dec, 1969
|
Guest
|
|
software sql server |
|
31 Dec, 1969
|
Guest
|
|
download sql server 2008 |
|
31 Dec, 1969
|
Guest
|
|
dbms wiki |
|
31 Dec, 1969
|
Guest
|
|
sql performance monitor |
|
31 Dec, 1969
|
Guest
|
|
select into sql server |
|
31 Dec, 1969
|
Guest
|
|
sql comment |
Showing: 1-20 of 38 »»
Powered by
KBPublisher (Knowledge base software)