Const SOURCE_PATH As String = "C:\PutSourceFolderNameHere"
Const TARGET_PATH As String = "C:\PutTargetFolderNameHere"
Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(SOURCE_PATH)
For Each objFile In objFolder.Files
objFSO.MoveFile objFolder.ShortPath & "\" & objFile.Name, TARGET_PATH & "\" & objFile.Name
Next
Set objFile = othing
Set objFolder = Nothing
Set objFSO = Nothing
On Wed, Jun 17, 2020 at 7:35 AM Jim Wagner <josephwagner2@outlook.com> wrote:
I had tried that but I could not get it to work.
Jim Wagner
From: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io> on behalf of Arnelito Puzon <agpuzon@gmail.com>
Sent: Tuesday, June 16, 2020 3:46 PM
To: MSAccessProfessionals@groups.io <MSAccessProfessionals@groups.io>
Subject: Re: [MSAccessProfessionals] Shell command to move filesYou should consider using filesystem object rather than using shell cmd.
Arnelito G. Puzon
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#115617) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
_._,_._,_
Tidak ada komentar:
Posting Komentar