- common path names
- Posted by c62ip64 on October 26th, 2005
Is there a way to create a path name so that it does not have to change when
referencing a file locally? I'm using UNC names to avoid the problems with
drive relative names but I have to change the path name to reference the file
locally. E.g.
\\G4\CognosDev\Logs\log file.txt - network reference
C:\CognosDev\Logs\log file.txt - local reference
I've tried using the . file name to refer to the current directory without
success. I'd like to use a common path name that will point to either a local
drive or the network drive depending on where the file is referenced. Is this
possible?
Thanks,
Tom
- Posted by Pegasus \(MVP\) on October 26th, 2005
"c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
news:485720E8-6A29-4EA9-B3F9-F5290A048E9D@microsoft.com...
> Is there a way to create a path name so that it does not have to change
when
> referencing a file locally? I'm using UNC names to avoid the problems with
> drive relative names but I have to change the path name to reference the
file
> locally. E.g.
>
> \\G4\CognosDev\Logs\log file.txt - network reference
> C:\CognosDev\Logs\log file.txt - local reference
>
> I've tried using the . file name to refer to the current directory without
> success. I'd like to use a common path name that will point to either a
local
> drive or the network drive depending on where the file is referenced. Is
this
> possible?
>
> Thanks,
> Tom
>
>
You can use \\G4\CognosDev\Logs\log file.txt locally or
remotely - it will always refer to the same file.
- Posted by c62ip64 on October 26th, 2005
I do not want to use \\G4\CognosDev\Logs\log file.txt locally. I want to use
a local file without impacting the remote file. I'm asking this to avoid
having to modify the path name when testing application changes locally.
Thanks,
Tom
"Pegasus (MVP)" wrote:
>
> "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> news:485720E8-6A29-4EA9-B3F9-F5290A048E9D@microsoft.com...
> > Is there a way to create a path name so that it does not have to change
> when
> > referencing a file locally? I'm using UNC names to avoid the problems with
> > drive relative names but I have to change the path name to reference the
> file
> > locally. E.g.
> >
> > \\G4\CognosDev\Logs\log file.txt - network reference
> > C:\CognosDev\Logs\log file.txt - local reference
> >
> > I've tried using the . file name to refer to the current directory without
> > success. I'd like to use a common path name that will point to either a
> local
> > drive or the network drive depending on where the file is referenced. Is
> this
> > possible?
> >
> > Thanks,
> > Tom
> >
> >
>
> You can use \\G4\CognosDev\Logs\log file.txt locally or
> remotely - it will always refer to the same file.
>
>
>
- Posted by Pegasus \(MVP\) on October 26th, 2005
Please give some explicit examples of what you're trying to do.
"c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
news:5517F4EB-C25F-49CC-AA26-16834455BF5D@microsoft.com...
> I do not want to use \\G4\CognosDev\Logs\log file.txt locally. I want to
use
> a local file without impacting the remote file. I'm asking this to avoid
> having to modify the path name when testing application changes locally.
>
> Thanks,
> Tom
>
> "Pegasus (MVP)" wrote:
>
> >
> > "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> > news:485720E8-6A29-4EA9-B3F9-F5290A048E9D@microsoft.com...
> > > Is there a way to create a path name so that it does not have to
change
> > when
> > > referencing a file locally? I'm using UNC names to avoid the problems
with
> > > drive relative names but I have to change the path name to reference
the
> > file
> > > locally. E.g.
> > >
> > > \\G4\CognosDev\Logs\log file.txt - network reference
> > > C:\CognosDev\Logs\log file.txt - local reference
> > >
> > > I've tried using the . file name to refer to the current directory
without
> > > success. I'd like to use a common path name that will point to either
a
> > local
> > > drive or the network drive depending on where the file is referenced.
Is
> > this
> > > possible?
> > >
> > > Thanks,
> > > Tom
> > >
> > >
> >
> > You can use \\G4\CognosDev\Logs\log file.txt locally or
> > remotely - it will always refer to the same file.
> >
> >
> >
- Posted by c62ip64 on October 27th, 2005
The following path names are used in a SQL Server application for logging and
to specify a data link connection:
\\G4\CognosDev\Logs\log file.txt
\\G4\CognosDev\Admin\ETRPTG01 Data Link.udl
I copy the application to a local instance for modifications and testing.
When testing these modifications, I do not want to create log entries on the
remote server file and I have my own data link file to connect to a local
instance of the data base. I change the path names to the following prior to
testing the modifications.
C:\CognosDev\Logs\log file.txt
C:\CognosDev\Admin\ETRPTG01 Data Link.udl
The only problem with this approach is that I and any other developer
working on modifications have to remember to change the path names back to
the UNC names prior to moving the modifications to the production server. I'm
looking to use a common path name that does not have to change when testing
modifications. The application would reference the files either on the remote
server for production or locally when testing modifications.
Thanks,
Tom
"Pegasus (MVP)" wrote:
> Please give some explicit examples of what you're trying to do.
>
>
> "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> news:5517F4EB-C25F-49CC-AA26-16834455BF5D@microsoft.com...
> > I do not want to use \\G4\CognosDev\Logs\log file.txt locally. I want to
> use
> > a local file without impacting the remote file. I'm asking this to avoid
> > having to modify the path name when testing application changes locally.
> >
> > Thanks,
> > Tom
> >
> > "Pegasus (MVP)" wrote:
> >
> > >
> > > "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> > > news:485720E8-6A29-4EA9-B3F9-F5290A048E9D@microsoft.com...
> > > > Is there a way to create a path name so that it does not have to
> change
> > > when
> > > > referencing a file locally? I'm using UNC names to avoid the problems
> with
> > > > drive relative names but I have to change the path name to reference
> the
> > > file
> > > > locally. E.g.
> > > >
> > > > \\G4\CognosDev\Logs\log file.txt - network reference
> > > > C:\CognosDev\Logs\log file.txt - local reference
> > > >
> > > > I've tried using the . file name to refer to the current directory
> without
> > > > success. I'd like to use a common path name that will point to either
> a
> > > local
> > > > drive or the network drive depending on where the file is referenced.
> Is
> > > this
> > > > possible?
> > > >
> > > > Thanks,
> > > > Tom
> > > >
> > > >
> > >
> > > You can use \\G4\CognosDev\Logs\log file.txt locally or
> > > remotely - it will always refer to the same file.
> > >
> > >
> > >
>
>
>
- Posted by Pegasus \(MVP\) on October 27th, 2005
If you application is smart enough to detect the name of your current
platform then you can get it to do something line this, here written in
batch file format:
if /i "%ComputerName%"=="TestPC" (set Source=C
else (set Source=\\G4)
%Source%\CognosDev\Logs\log file.txt
%Source%\CognosDev\Admin\ETRPTG01 Data Link.udl
"c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
news:C66088C5-D5D7-4E02-AA27-0090244AA87D@microsoft.com...
> The following path names are used in a SQL Server application for logging
and
> to specify a data link connection:
>
> \\G4\CognosDev\Logs\log file.txt
> \\G4\CognosDev\Admin\ETRPTG01 Data Link.udl
>
> I copy the application to a local instance for modifications and testing.
> When testing these modifications, I do not want to create log entries on
the
> remote server file and I have my own data link file to connect to a local
> instance of the data base. I change the path names to the following prior
to
> testing the modifications.
>
> C:\CognosDev\Logs\log file.txt
> C:\CognosDev\Admin\ETRPTG01 Data Link.udl
>
> The only problem with this approach is that I and any other developer
> working on modifications have to remember to change the path names back to
> the UNC names prior to moving the modifications to the production server.
I'm
> looking to use a common path name that does not have to change when
testing
> modifications. The application would reference the files either on the
remote
> server for production or locally when testing modifications.
>
> Thanks,
> Tom
>
>
>
> "Pegasus (MVP)" wrote:
>
> > Please give some explicit examples of what you're trying to do.
> >
> >
> > "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> > news:5517F4EB-C25F-49CC-AA26-16834455BF5D@microsoft.com...
> > > I do not want to use \\G4\CognosDev\Logs\log file.txt locally. I want
to
> > use
> > > a local file without impacting the remote file. I'm asking this to
avoid
> > > having to modify the path name when testing application changes
locally.
> > >
> > > Thanks,
> > > Tom
> > >
> > > "Pegasus (MVP)" wrote:
> > >
> > > >
> > > > "c62ip64" <c62ip64@discussions.microsoft.com> wrote in message
> > > > news:485720E8-6A29-4EA9-B3F9-F5290A048E9D@microsoft.com...
> > > > > Is there a way to create a path name so that it does not have to
> > change
> > > > when
> > > > > referencing a file locally? I'm using UNC names to avoid the
problems
> > with
> > > > > drive relative names but I have to change the path name to
reference
> > the
> > > > file
> > > > > locally. E.g.
> > > > >
> > > > > \\G4\CognosDev\Logs\log file.txt - network reference
> > > > > C:\CognosDev\Logs\log file.txt - local reference
> > > > >
> > > > > I've tried using the . file name to refer to the current directory
> > without
> > > > > success. I'd like to use a common path name that will point to
either
> > a
> > > > local
> > > > > drive or the network drive depending on where the file is
referenced.
> > Is
> > > > this
> > > > > possible?
> > > > >
> > > > > Thanks,
> > > > > Tom
> > > > >
> > > > >
> > > >
> > > > You can use \\G4\CognosDev\Logs\log file.txt locally or
> > > > remotely - it will always refer to the same file.
> > > >
> > > >
> > > >
> >
> >
> >