PC Review


Reply
Thread Tools Rate Thread

ChDir behavior

 
 
HC
Guest
Posts: n/a
 
      22nd Jul 2008
Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
the new directory is C:\A while on the 8th machine it remains C:\A\B with no
error message.

OS is windows XP SP3. Have reloaded Office 2003 several times with no
change in behavior

Any suggestions as to where to look for glitch?
 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      22nd Jul 2008
Hi HC

Try to use it together with ChDrive

MyPath = "C:\A"
ChDrive MyPath
ChDir MyPath

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"HC" <(E-Mail Removed)> wrote in message news:B2623100-70AF-4B03-860B-(E-Mail Removed)...
> Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
> the new directory is C:\A while on the 8th machine it remains C:\A\B with no
> error message.
>
> OS is windows XP SP3. Have reloaded Office 2003 several times with no
> change in behavior
>
> Any suggestions as to where to look for glitch?

 
Reply With Quote
 
HC
Guest
Posts: n/a
 
      22nd Jul 2008
Tried it, and got a "path not found" error on the one machine, other machines
work as expected.

"Ron de Bruin" wrote:

> Hi HC
>
> Try to use it together with ChDrive
>
> MyPath = "C:\A"
> ChDrive MyPath
> ChDir MyPath
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "HC" <(E-Mail Removed)> wrote in message news:B2623100-70AF-4B03-860B-(E-Mail Removed)...
> > Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
> > the new directory is C:\A while on the 8th machine it remains C:\A\B with no
> > error message.
> >
> > OS is windows XP SP3. Have reloaded Office 2003 several times with no
> > change in behavior
> >
> > Any suggestions as to where to look for glitch?

>

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd Jul 2008
Test if you use the correct Separator in the path

MsgBox Application.PathSeparator


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"HC" <(E-Mail Removed)> wrote in message news:2B3726F3-A37F-48E3-A7BB-(E-Mail Removed)...
> Tried it, and got a "path not found" error on the one machine, other machines
> work as expected.
>
> "Ron de Bruin" wrote:
>
>> Hi HC
>>
>> Try to use it together with ChDrive
>>
>> MyPath = "C:\A"
>> ChDrive MyPath
>> ChDir MyPath
>>
>> --
>>
>> Regards Ron de Bruin
>> http://www.rondebruin.nl/tips.htm
>>
>>
>> "HC" <(E-Mail Removed)> wrote in message news:B2623100-70AF-4B03-860B-(E-Mail Removed)...
>> > Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
>> > the new directory is C:\A while on the 8th machine it remains C:\A\B with no
>> > error message.
>> >
>> > OS is windows XP SP3. Have reloaded Office 2003 several times with no
>> > change in behavior
>> >
>> > Any suggestions as to where to look for glitch?

>>

 
Reply With Quote
 
HC
Guest
Posts: n/a
 
      23rd Jul 2008
Path separator is indeed the back slash "\"

"Ron de Bruin" wrote:

> Test if you use the correct Separator in the path
>
> MsgBox Application.PathSeparator
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "HC" <(E-Mail Removed)> wrote in message news:2B3726F3-A37F-48E3-A7BB-(E-Mail Removed)...
> > Tried it, and got a "path not found" error on the one machine, other machines
> > work as expected.
> >
> > "Ron de Bruin" wrote:
> >
> >> Hi HC
> >>
> >> Try to use it together with ChDrive
> >>
> >> MyPath = "C:\A"
> >> ChDrive MyPath
> >> ChDir MyPath
> >>
> >> --
> >>
> >> Regards Ron de Bruin
> >> http://www.rondebruin.nl/tips.htm
> >>
> >>
> >> "HC" <(E-Mail Removed)> wrote in message news:B2623100-70AF-4B03-860B-(E-Mail Removed)...
> >> > Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
> >> > the new directory is C:\A while on the 8th machine it remains C:\A\B with no
> >> > error message.
> >> >
> >> > OS is windows XP SP3. Have reloaded Office 2003 several times with no
> >> > change in behavior
> >> >
> >> > Any suggestions as to where to look for glitch?
> >>

>

 
Reply With Quote
 
HC
Guest
Posts: n/a
 
      23rd Jul 2008
It appears that a couple of non-print characters or a backspace got into the
directory name corrupting the chdir process. Re-entered the folder name and
all is good.

Thanks Ron for the effort (I'm embarassed - should have checked that sooner)

"Ron de Bruin" wrote:

> Test if you use the correct Separator in the path
>
> MsgBox Application.PathSeparator
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "HC" <(E-Mail Removed)> wrote in message news:2B3726F3-A37F-48E3-A7BB-(E-Mail Removed)...
> > Tried it, and got a "path not found" error on the one machine, other machines
> > work as expected.
> >
> > "Ron de Bruin" wrote:
> >
> >> Hi HC
> >>
> >> Try to use it together with ChDrive
> >>
> >> MyPath = "C:\A"
> >> ChDrive MyPath
> >> ChDir MyPath
> >>
> >> --
> >>
> >> Regards Ron de Bruin
> >> http://www.rondebruin.nl/tips.htm
> >>
> >>
> >> "HC" <(E-Mail Removed)> wrote in message news:B2623100-70AF-4B03-860B-(E-Mail Removed)...
> >> > Current directory is c:\A\B . If chdir ".." is executed, on 7 of 8 machines
> >> > the new directory is C:\A while on the 8th machine it remains C:\A\B with no
> >> > error message.
> >> >
> >> > OS is windows XP SP3. Have reloaded Office 2003 several times with no
> >> > change in behavior
> >> >
> >> > Any suggestions as to where to look for glitch?
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ChDir and ChDrive Conan Kelly Microsoft Excel Programming 2 24th Dec 2008 09:26 PM
ChDir Question =?Utf-8?B?eFJvYWNoeA==?= Microsoft Access VBA Modules 2 26th Sep 2005 06:28 PM
Console App trying to do a ChDir? =?Utf-8?B?Q2hyaXM=?= Microsoft C# .NET 11 26th May 2005 02:36 PM
XL2K: What's up with ChDir? Please help! Mike Mertes Microsoft Excel Programming 5 7th Mar 2005 03:26 PM
Chdir before Filedialog Maarten Microsoft Access 1 26th Dec 2003 05:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 AM.