why chdir and chdrive does not work????

J

Joy

I use the following codes to import data in csv file stored in the temp
directory to the project file.

FileOpen Name:=GetTempDir & "\CPLMExport.csv", FormatID:="MSProject.CSV",
Merge:=2, map:="ExportMap"


GetTempDir gets a temp directory

after that, if I use chDrive and chdir to change the current directory from
the temp directory to the directory where the file is stored, like
"C:\Documents and Settings\<user>\Desktop". Then I go to file->Save As, the
default directory is still the temp directory !!.


I also tried open the project file after the above codes using FileOpen, and
the default directory is till the temp directory.

it is strange....why chdir and chdrive does not work if open a file in temp
directory.

or is there any other way to import data in csv file??

thank you
 
J

jack dahlgren

How are you using chdir?
I'd just do a file save as and point it to the directory that you want.

-Jack Dahlgren
 
J

Joy

I use

chdir curdir

and I find it does not work .

I should store activeproject.path first, and chdir to that ...
thank you

now it works
 

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

Top