A
Andy
A couple of questions about Shell functions.
1. When calling the Shell function, is it possible to pause the Access
script until the application called by the shell function has completed. The
shell function returns a double value which I guess is the process id of the
application that has been called?
2. Not strictly an Access VBA question but someone might know. In the Shell
function above I am calling a cmd script to copy an Access database from one
location to another (I then refresh all the linked tables in database at new
location - you can now see why I want to wait until the copy has completed -
hence question 1). When using copy or xcopy in DOS you need to cd to the
source directory (folder) and then copy a file (or files) to a target
directory (folder). Fine if the source directory has a local Drive letter but
how would you do this if the source directory is on the network with no local
drive letter (say \\machine1\folderA\). So:-
For Local Drive letter (say e the cmd script might look like :-
e:
cd folderA\
xcopy *.mde c:\myfolder\ /Y
For Nework :-
You cant do the e: bit to position on the selected drive.
Maybe the ip address of the Network machine could be used somehow?
Thanks.
1. When calling the Shell function, is it possible to pause the Access
script until the application called by the shell function has completed. The
shell function returns a double value which I guess is the process id of the
application that has been called?
2. Not strictly an Access VBA question but someone might know. In the Shell
function above I am calling a cmd script to copy an Access database from one
location to another (I then refresh all the linked tables in database at new
location - you can now see why I want to wait until the copy has completed -
hence question 1). When using copy or xcopy in DOS you need to cd to the
source directory (folder) and then copy a file (or files) to a target
directory (folder). Fine if the source directory has a local Drive letter but
how would you do this if the source directory is on the network with no local
drive letter (say \\machine1\folderA\). So:-
For Local Drive letter (say e the cmd script might look like :-
e:
cd folderA\
xcopy *.mde c:\myfolder\ /Y
For Nework :-
You cant do the e: bit to position on the selected drive.
Maybe the ip address of the Network machine could be used somehow?
Thanks.