Re: Find the full path of a file
- From: "Brendan Reynolds" <brenreyn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 10:35:46 -0000
Will it always be in the users temp folder? If so, I believe there is code
to find the location of the users temp folder in the API section at
www.mvps.org/access
Alternatively, if the folder is relative to the folder where the Access app
is installed, you can get that folder with CurrentProject.Path. For example,
I have a Help folder which is a subfolder of the folder where one of my apps
is installed, I can refer to it in code as ...
CurrentProject.Path & "\Help"
--
Brendan Reynolds
"Tim" <Tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:29DF4D5E-78D0-4C98-91FF-6B771C55F9A8@xxxxxxxxxxxxxxxx
> Hi Duane/Larry,
>
> Sorry for the lacking information. I am using Access XP for this project.
> So far, both of the files are located in c:\temp but the folder will be
> moved
> when they move to production for different sites. Therefore, I need some
> code to get the path of fileA.txt.
>
> Thanks in advance.
>
> Tim.
>
> "Larry Daugherty" wrote:
>
>> Just delete fielB.txt! :-)
>>
>> Now if my answer seems a bit open and lacking in detail, you might
>> consider what information you've given us in hopes of receiving an
>> answer.
>>
>> The long and the short of it is that the executing program must be
>> given the information by some means so that it can find and kill the
>> one and only correct file and intelligently communicate any exceptions
>> to the user. You have communicated one useful bit of information:
>> FileA.txt and FileB.txt exist in the same folder. Now step right up
>> and explain how you got to the correct folder and what you did there
>> before you want to kill FileB.txt.
>>
>> Another issue: you haven't stated that MS Access is even a
>> consideration in your issue. This newsgroup is for Access, the
>> relational database application from Microsoft.
>>
>> HTH
>> --
>> -Larry-
>> --
>>
>> "Tim" <Tim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:1E53025E-E2AD-47B9-9112-717B770D127B@xxxxxxxxxxxxxxxx
>> > Hi folks,
>> >
>> > I have two files (fileA.txt and fileB.txt) in the same folder.
>> Could anyone
>> > tell me the way to delete fileB.txt without knowing the path of
>> fileB.txt?
>> > In other words, I want to know the full path of fileA.txt.
>> >
>> > Thanks in advance.
>> >
>> > Tim
>>
>>
>>
.
- References:
- Re: Find the full path of a file
- From: Larry Daugherty
- Re: Find the full path of a file
- Prev by Date: Re: how to know if a form is a subform
- Next by Date: Re: runtime error 3270 when attempting to assign custom icon
- Previous by thread: Re: Find the full path of a file
- Next by thread: Re: How do i program an option button?
- Index(es):