How to make a tree program to refresh all drives
tree
is a command that lists all the directory of the specified path. It produce a depth-indented listings of files. That also do the work of refreshing the system. By using Batch Scripting it's possible to make a file that can tree all the directory of the system. So if we tree all the drives of our system it would refreshes all the drives. This can help you to refresh a your system more efficiently than refreshing it manually by clicking "Refresh
option of the right button menu or by pressing the F5
key.
So lets make a tre program.
1.Right Click on desktop and click on New
then select Text Document
.
2.Then open the file with Notepad or with other text editor that you prefer and write down the Batch script given bellow.
@Echo off
cd\
tree
c:
tree
d:
tree
e:
tree
f:
tree
g:
3. Then at the top left side click on File
and select Save As
.
4. Then set the file name as tree.bat
or whatever you want but keep in mind that the name must be terminated by a .bat
extension.
5. Then click on the Save as type
and select All Files
then click Save
.
Note. If you don't set the Save as type
as All Files
then the file will save as a Text Document
that can't run as a Batch file and you won't get your tree program. So in order to get your program set the type as All Files
.
6.Then you will get a file named tree
(or whatever you've typed in the File Name
fill on the Save as
window).
7.Then run the file by double click on it or you can run it as Administrator to do so follow the next step.
7.1 Then right click on the file and select Run as Administrator
then the program will run like the picture given on the 7. point.
Hope that you've gotten your tree program and it's running without any error. If you've any question you can comment below or can use our Ask Question page.
No comments: