border20 Registered User. Local time Today, 21:44 Joined Jan 8, 2003 Messages 92 Mar 11, 2003 #1 Is there a way to run a bat file from access ? or even better to do a copy operation ?
W WayneRyan AWF VIP Local time Today, 21:44 Joined Nov 19, 2002 Messages 7,122 Mar 11, 2003 #2 border20, You can use the Shell function. Wayne
J Jacob Mathai Registered User. Local time Today, 21:44 Joined Sep 6, 2001 Messages 546 Mar 11, 2003 #3 Create a button. Then use this code (on click) : Private Sub Command9_Click() Dim RetVal RetVal = Shell("D:\TEST.BAT", 1) End Sub
Create a button. Then use this code (on click) : Private Sub Command9_Click() Dim RetVal RetVal = Shell("D:\TEST.BAT", 1) End Sub
border20 Registered User. Local time Today, 21:44 Joined Jan 8, 2003 Messages 92 Mar 11, 2003 #4 Ok I did that but the bat file didn't run normaly,,, the root was Mydocs folder instead of the dir where the file is located... Last edited: Mar 11, 2003
Ok I did that but the bat file didn't run normaly,,, the root was Mydocs folder instead of the dir where the file is located...
ghudson Registered User. Local time Today, 16:44 Joined Jun 8, 2002 Messages 6,194 Mar 11, 2003 #5 Do you want to copy a single file that will always be in the same location with the same file name? Or, do you want to copy all files from one folder to another?
Do you want to copy a single file that will always be in the same location with the same file name? Or, do you want to copy all files from one folder to another?
border20 Registered User. Local time Today, 21:44 Joined Jan 8, 2003 Messages 92 Mar 11, 2003 #6 I only want to copy a simple file that will always be in the same location with the same file name
ghudson Registered User. Local time Today, 16:44 Joined Jun 8, 2002 Messages 6,194 Mar 12, 2003 #7 Easy...you want to use the FileCopy Statement. Check the help files for more info on using the FileCopy Statement. Copy source file to target file... FileCopy C:\Test\Source.txt, X:\Testing\Destination.txt HTH
Easy...you want to use the FileCopy Statement. Check the help files for more info on using the FileCopy Statement. Copy source file to target file... FileCopy C:\Test\Source.txt, X:\Testing\Destination.txt HTH
border20 Registered User. Local time Today, 21:44 Joined Jan 8, 2003 Messages 92 Mar 12, 2003 #8 ok, but will thew filecopy statemement take a relative path ?? for example could i put: filecopy /folder/document.doc, /document.doc ?
ok, but will thew filecopy statemement take a relative path ?? for example could i put: filecopy /folder/document.doc, /document.doc ?