How to put data file in the same directory as codes

I need help to import data in the same directory and how to create that directory please.

2 Answers



0



How to create a directory?

How to import data in such directory?

please help



0



I am not certain that I am understanding your question. I think you are asking how to:

  1. Create a folder on your computer.
  2. Move a GAUSS program file and a data file to this location.

Create a new folder on your computer

You do not need to do this in GAUSS. You can do this as you normally would on your OS. For example:

  1. Open macOS or Windows Finder, or Windows File Explorer.
  2. Browse to the location in which you would like to create the new folder.
  3. Right-click and select New Folder, Create Folder, or the similar option for your operating system.

Move your files

If you have the file open in a program such as GAUSS or Excel, you can select File > Save as to save the file in your newly created folder.

If the file is not open, you can:

  1. Right-click on the file in Finder or Windows File Explorer.
  2. Browse to the new directory.
  3. Right-click in the new directory and select Paste from the context menu.

Change your GAUSS working directory

Once the files are where you want them, you will probably want to change your GAUSS working directory to this new folder. You can change your GAUSS working directory with the GAUSS chdir command:

// Set your GAUSS working directory to your Documents directory
chdir /Users/YourUserName/Documents;

// Set your GAUSS working directory to your Documents directory
chdir "C:\\Users\\YourUserName\\Documents";

or you can use the window menus by clicking the icon with three dots which is highlighted in orange below.

GAUSS working directory toolbar control

Then browse in the Finder or Windows File Explorer and select the new folder.

aptech

1,773

Your Answer

2 Answers

0

How to create a directory?

How to import data in such directory?

please help

0

I am not certain that I am understanding your question. I think you are asking how to:

  1. Create a folder on your computer.
  2. Move a GAUSS program file and a data file to this location.

Create a new folder on your computer

You do not need to do this in GAUSS. You can do this as you normally would on your OS. For example:

  1. Open macOS or Windows Finder, or Windows File Explorer.
  2. Browse to the location in which you would like to create the new folder.
  3. Right-click and select New Folder, Create Folder, or the similar option for your operating system.

Move your files

If you have the file open in a program such as GAUSS or Excel, you can select File > Save as to save the file in your newly created folder.

If the file is not open, you can:

  1. Right-click on the file in Finder or Windows File Explorer.
  2. Browse to the new directory.
  3. Right-click in the new directory and select Paste from the context menu.

Change your GAUSS working directory

Once the files are where you want them, you will probably want to change your GAUSS working directory to this new folder. You can change your GAUSS working directory with the GAUSS chdir command:

// Set your GAUSS working directory to your Documents directory
chdir /Users/YourUserName/Documents;

// Set your GAUSS working directory to your Documents directory
chdir "C:\\Users\\YourUserName\\Documents";

or you can use the window menus by clicking the icon with three dots which is highlighted in orange below.

GAUSS working directory toolbar control

Then browse in the Finder or Windows File Explorer and select the new folder.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.