Could someone help me to run a batch file in access
for example: Tiffs are available in some "X" folder and we need to move this into "Y"folder. how to run a batch file from Access2010 application.
we have to operate from Access 2010
Could someone help me to run a batch file in access
for example: Tiffs are available in some "X" folder and we need to move this into "Y"folder. how to run a batch file from Access2010 application.
we have to operate from Access 2010
Since this question is not relevant to this thread, perhaps a new thread is in order.
As for creating a batch file to copy directories, why bother when you can do it with VBA? Just reference the Filesystem Object for early binding. If you really want a script file, here is an example of copying a file using VBScript. It uses the .VBS extension.
Code:Dim sourceFile Dim destinationFile Dim strDesFilName Dim strNow Dim aFSO strNow = Year(Date) & "_" & Month(Date) & "_" & Day(Date) & "_" & Hour(Now) & Minute(Now) & "_" & Second(Now) strDesFilName = "Inv_Copy_" & strNow & ".accdb" destinationFile = "C:\Inventory_Backup\" & strDesFilName sourceFile = "\\ServerName\Inventory\Inventory.accdb" Set aFSO = CreateObject("Scripting.FileSystemObject") aFSO.CopyFile sourceFile, destinationFile
thanks for help,
one more doubt is it possible if we put this in a form with command button once we run this we get the data from "X" folder to "Y" Folder.
same which is happen in the bat file example : move : "c:/x/*example*.TIF" "C:/Y".
The example in post #10 is Visual Basic. It can be used to create a VBScript (.vbs) file. This is very similar to creating a Batch (.bat) file and running the file. As I mentioned before, you can use code behind a form to do the same thing, without creating an external bat or vbs file.
Access uses VBA or Visual Basic for Applications. VBA is not VB.
I looked at the VB code in post #10 and I believe this will work behind a form in Access. You may need to change a couple of things, though.
I would make a reference to Microsoft Scripting Runtime and use early binding of the File System Object Model (FSO). Then you could do stuff like the following (and more).
Code:Dim fsoObject As New FileSystemObject Dim fsoFolder As Folder Dim fsoFile As File Dim strPath As String strPath = "C:\Test" Set fsoFolder = fsoObject.GetFolder(strPath) For Each fsoFile In fsoFolder.Files Debug.Print fsoFile.Name Next strPath = "" Set fsoFile = Nothing Set fsoFolder = Nothing Set fsoObject = Nothing
i am not able to understand where this code use, i need one access database with the code for Move the data from one folder to another folder
for example i have one folder with 50000 tif images out of this i have to move 30000 tifs in another folder and it takes lot of time i have the code in excel but i need this in access. please provide me the code in access database so that i can use this in access form by clicking with one button
sorry for inconvience. can u please provide me the attachment of access for example if possible.
any update on this issue