I have this code:
Stream f = File.Open("data.majid", FileMode.OpenOrCreate, FileAccess.ReadWrite);
Where will be file created?
A default folder is a folder that is used for various applications if the user does not specify a different folder.
Excel, by default, saves all files in the folder: C:\Users\*username*\Documents. To change this, in the Ribbon, go to File > Options. 1.
Open Excel and navigate to the File menu. Click on Options, then Advanced. Scroll down until you see General. Locate the line that says “At startup, open all files in:” Enter the path to an existing folder that you want to use as your default when opening files in Excel.
Right-click the “Start” menu shortcut for the application, and select More > Open file location. This will open a File Explorer window that points to the actual application shortcut file.
From the File.Open
MSDN documentation:
The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.
Usually the directory where the process was started from. This is the current working directory.
From MSDN
The current directory is distinct from the original directory, which is the one from which the process was started.
From MSDN
;
The path parameter is permitted to specify relative or absolute path information. Relative path information is interpreted as relative to the current working directory. To obtain the current working directory, see GetCurrentDirectory.
Check out Directory.GetCurrentDirectory
The current directory is distinct from the original directory, which is the one from which the process was started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With