Hi.
I have written some sentences to set the current directory where to find the files of interest but it dones not work. Any help? Thanks
Set Current Directory( "/Users/manel/Desktop/Municipales_Spain" );
my_file = Pick File( {"All files|*"} );
dt = Open( my_file );
dt << Select Where(
Código de Provincia == 44
);
SubDt = dt << Subset( output table name( "Matarranya1" ) );
Close( "Matarranya1", Save( "/Users/manel/Desktop/Municipales Spain/04_1995Terol.jmp" ) );
Close All( Data Tables, No Save );
Would this do what you need?
path = "/Users/manel/Desktop/Municipales_Spain";
my_file = Pick File( "", path, {"All files|*"} );
dt = Open( my_file );
dt << Select Where(
Código de Provincia == 44
);
SubDt = dt << Subset( output table name( "Matarranya1" ) );
Close( "Matarranya1", Save( path||"/04_1995Terol.jmp" ) );
Close All( Data Tables, No Save );
The scripting index (Help>>Scripting Index) doesn't say there's anything called set current directory(). Are you looking for
Set File Search Path(
{Convert File Path( "$SAMPLE_DATA/" ), Convert File Path( "$SAMPLE_DATA/Time Series/" )}
)
Hi Vince, I try your proposal but I can't change the directory.
Set File Search Path( {Convert File Path( "/Users/manel/Desktop/ELECCIONS/JMP coses/Scipts/" ), Convert File Path( "/Users/manel/Desktop/Municipales_Spain/" )} );
When I ask about the Default Directory();
I get:
"/Users/manel/Desktop/ELECCIONS/JMP coses/Scipts/"
Would this do what you need?
path = "/Users/manel/Desktop/Municipales_Spain";
my_file = Pick File( "", path, {"All files|*"} );
dt = Open( my_file );
dt << Select Where(
Código de Provincia == 44
);
SubDt = dt << Subset( output table name( "Matarranya1" ) );
Close( "Matarranya1", Save( path||"/04_1995Terol.jmp" ) );
Close All( Data Tables, No Save );
Eureka!
Thanks a lot!
Just to add to the other responses, you should not use the Set Current Directory() function. It has been deprecated because of bad behavior. The correct function to use is Set Default Directory().
Names Default To Here( 1 );
Set Default Directory( "$SAMPLE_DATA" );
Open( "Big Class.jmp" );