Truncating Folders

N

Noemi

Hi

I select the folder which contains other folders that have files in them
however what I would like to be able to do is remove the initial dir from the
path

ie path would be c:\Test 1\Testing 2\Testing 3\test.pdf

new result would be Test 1\Testing 2\Testing 3\test.pdf

The reason for this requirement is I have an access table which I need to do
a search for the new results to compare the image type with the table.

I have no problem with the rest of the code it is only removing the initial
dir.

Thanks
Noemi
 
D

Dirk Goldgar

Noemi said:
Hi

I select the folder which contains other folders that have files in them
however what I would like to be able to do is remove the initial dir from
the
path

ie path would be c:\Test 1\Testing 2\Testing 3\test.pdf

new result would be Test 1\Testing 2\Testing 3\test.pdf

The reason for this requirement is I have an access table which I need to
do
a search for the new results to compare the image type with the table.

I have no problem with the rest of the code it is only removing the
initial
dir.


For example:

Dim strPath As String

strPath = "c:\Test 1\Testing 2\Testing 3\test.pdf"

strPath = Mid(strPath, InStr(strPath, "\") + 1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top