How do you drop part of a file name...

  • Thread starter Thread starter DT
  • Start date Start date

DT

Registered User.
Local time
Today, 02:59
Joined
Oct 23, 2000
Messages
83
I have built our viewing software into a Access97 database. I can get the file to load ok. But I need to be able to drop part of the file name to get this to work correctly. Example: file name: 2243-b.dwg
I need to drop the "b" (2243-.dwg) without having to rename 35000+ files. Is it this possible?
 
I'm not quite sure exactly what you are try to do here, but if you have the filename held as a string, you could splice it up using the Right, Left and Mid commands and then put it back together again to get the desired result.
If you can give uys a bit move information I'm sure someone will be able to help.
 
When the viewer goes out and searches our network, I don't want it to look for the "B" (letter in the filename). Does this help. I know I am being vague. I am fairly new to Access, so if you have more questions I will try to be more specific.

I am not familiar with the Right, Left and Mid commands. How do you use these?
 
How are you selecting the file? - are you usingthe commond dialogs control (and allowing the user to select the file, or are you wanting access to go out and find all and any filenames that match a certain pattern?

Mike
 
Access is finding the filenames
 
I'm not sureif this will be any use at all,or if perhaps I'm barking up the wrong tree; I hav an application that has to import any and all new files of a certain type in a certain location, but not import them more than once;I do this by using the DIR function to find and store in a string the first matching filename (you can use wildcards with DIR) then import the file,then move it to another folder called 'done', that way,when the DIR function goes to look again, it either finds the name of the next file to be imported, or returns an empty string and this ends the import loop

HTH

Mike
 

Users who are viewing this thread

Back
Top Bottom