- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 457字
- 2021-07-02 15:29:22
Making a directory and creating a file from Command Prompt
Now, you want to make sure that you have the samplefile.txt file. So, to do that in Windows, type cmd, which is short for Command Prompt, and open that. At the C:\> prompt, start by typing cd.. to go up one level and then cd.. again to go up another level. Then enter cd data to change to the data directory. The system responds that this path does not exist, as you can see in Figure 5.5.3; so, we'll have to create the path and make the file:

To create the path, type the following at command prompt:
C:\>md data
Then, enter the following to change into that directory:
C:\>cd data
Next, type the following to show you the list of files in the directory:
C:\data\dir
As you can see in the Figure 5.5.3, there is nothing inside the directory: it's new, we just created it. So, to open a file in Notepad, type the following at the prompt:
C:\data\notepad.exe samplefile.txt
This makes the file. When the screen prompt asks if you want to create a new file, click on the Yes button. This will open a blank Notepad file. Enter some text, as shown in Figure 5.5.4:

Make sure that you save it in the C:\data directory (Ctrl + S) and then you can close it.
Now, take a look. To recall previous commands, you can just press the up arrow key or, in this case, type dir at command prompt as earlier: C:\data\dir. Now you can see that samplefile.txt is present in the directory, as shown in Figure 5.5.5:

Now launch this in your browser, and take a look at the results. Click on the Show button. It's working as expected: it opened both the Notepad file and the Bing home page, as shown in Figure 5.5.6:

You can now launch any browser, a process of some kind, directly from your page and show it and you can open up a file, if you want, directly from a browser.
Also, you can see the listing of the keys, as shown in Figure 5.5.7:

So, these are some of the basics of what you can do with a generic dictionary.
- Learning Python Web Penetration Testing
- 流量的秘密:Google Analytics網站分析與優化技巧(第2版)
- 大學計算機基礎(第三版)
- Angular UI Development with PrimeNG
- Instant Apache Stanbol
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- Visual C++數字圖像模式識別技術詳解
- Internet of Things with Intel Galileo
- 深度強化學習算法與實踐:基于PyTorch的實現
- JS全書:JavaScript Web前端開發指南
- Java Web開發技術教程
- AutoCAD 2009實訓指導
- Nagios Core Administration Cookbook(Second Edition)
- Extending Unity with Editor Scripting
- Scala Functional Programming Patterns