Truncating Folders

  • Thread starter Thread starter Noemi
  • Start date Start date
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
 
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)
 
Back
Top