Moving Documents and Reading for Existance of Server Folders

robert brinkman

New member
Local time
Today, 05:56
Joined
Jan 9, 2003
Messages
3
I am running a home grown access application. My goal is to take documents that I scan in and attach them to a microsoft hyperlink. I have the logic developed to do that, but I would like to change the logic to have the software work like this. The individual picks a consumer. The software reads all of the adobe documents for the consumer and populates a pick list on a form. The software than goes out and reads to see if that user has an external documents folder under our client files directory. If that file doesn't exist. The software doesn't copy the file. If it does the file is cut from the external documents folder to the clients external documents folder. Here is some variables to consider. I have some logic already in place to read word documents from an external folder. I think I can modify this logic to read for adobe files. I am looking for input on reading for the existance of an external documents file under the client file and if at all possible how to cut a file from one directory and move it to another directory using visual basic code.

The Server Directories That I am using are:
\\Userssrvr\users\ClientFiles\ExternalDocuments\
\\Userssrvr\users\ClientFiles\500000\ExternalDocuments\

I am also including the code that I am using for reading external documents. If that helps at all. This comes out of the Access Module.

Public Function GetFileList() As String
Dim sFile As String
Dim sList As String
Dim stPath As String
stPath = "u:\E-Clinical\Documents\"
stPath = Trim(stPath)
If Right(stPath, 1) <> "\" Then stPath = stPath & "\"

sFile = Dir(stPath & "*.DOC")
Do While sFile <> ""
sList = sList & sFile & ";"
sFile = Dir
Loop
'Strip off the last ";"
If Len(sList) > 1 Then sList = Left(sList, Len(sList) - 1)

GetFileList = sList

End Function

If anyone has any questions I can be reached at the following emails robertbrinkman98@hotmail.com and robertb@wmcmhs.org

I appreciate any help on this I am a novice VB programmer.

Thanks
Robert Brinkman
 
I am not sure I totally understand what you are trying to do but I think you will find your answer in one of these threads.

Moving files in code
Check if a directory exist and create a directory
Check if Folder Exists
Select directory when exporting text
Folder Existence
Create a folder in a nt directory direct from access

Some of the topics overlap but you should be covered. If you do need more help please post back. One more quick note. I believe you can use the same logic to check for a file that you use to check for a directory.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom