473,289 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

need to copy a file from one location to another within access - ties up application

167 100+
I support an access (2000) application. I have a request to copy this application to another location from within the application. I have used the the filescriptingobject fs.copyfile, it leaves the app open until the copy is complete. I also created a DOS .bat file to do the copy and I execute this from within the application but it also leaves the app open until the copy is complete. I can physically close the app, but the DOS window stays open. The app is large so it takes about 30 minutes to copy (with the fact that the servers are located elsewhere). I can not leave the app open while this copy takes place. I am running out of ideas... does anyone have any suggestions?
What I would really like is to be able to initiate the copy in the background so it can't be seen and be able to return to the form (where the cmdbutton was to initiate it) and have the user exit the application.
THanks!
Jan 14 '09 #1
3 3804
NeoPa
32,554 Expert Mod 16PB
The Shell() function works asynchronously. Would this resolve your problem?

A Cmd file (similar to .Bat) can be set up using PAUSE to allow you to continue only after the user has quit the db.
Jan 15 '09 #2
ncsthbell
167 100+
@NeoPa
Right now my 'Test.bat' file contains the following statements:
Expand|Select|Wrap|Line Numbers
  1. COPY C:\Testdb.mdb, T:\Testdb.mdb 
are you suggesting trying instead?
Call Shell(Test.bat)
Not sure I understand about the Cmd file. I have never used one before. Would the cmd file initiate the copying?
Jan 15 '09 #3
NeoPa
32,554 Expert Mod 16PB
@ncsthbell
Firstly, I would remove the comma (,) from the command. That is incorrect syntax and may cause problems (May be an irrelevant typo of course too).
@ncsthbell
Fundamentally yes.
@ncsthbell
If, after fixing your .BAT file you were to rename it to Test.Cmd, then you could say instead :
Expand|Select|Wrap|Line Numbers
  1. Call Shell(Test.Cmd)
I would also consider adding PAUSE lines before and/or after the COPY to allow you to synchronise the copy after the database has been closed, as well as to allow you to see that it had completed ok.

Possibly something like :
Test.Cmd
Expand|Select|Wrap|Line Numbers
  1. PAUSE
  2. COPY C:\Testdb.mdb T:\Testdb.mdb
  3. PAUSE
Jan 15 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
2
by: Gidi | last post by:
Hi, I saw that someone asked that question here before, and i tried one of the answer that was gaven (Bob's tricks and tiips), The suggestion there was using the ImoprtDll and tried to import...
3
by: jlea | last post by:
I'm receiving the error message shown below when I try to load an aspx file (C# web application) on our server. The web application works fine if I remove the reference to the dll so I know the...
2
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
3
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
1
by: vikjohn | last post by:
I have a new perl script sent to me which is a revision of the one I am currently running. The permissions are the same on each, the paths are correct but I am getting the infamous : The specified...
3
by: Tony Johansson | last post by:
Hello! We have a C#.ASP.NET web application that runs on a IIS 6. The application contains actually several asp pages but there is no GUI. The application receive an xml file that is processed....
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.