Posts

Showing posts from March, 2018

Operating Systems 1 Lab 5 – DOS Environmental Variables

Image
Type ‘set’ into the window.   -> This shows a list of all available DOS variables. echo %PATH%   --> It shows all paths that contain executable files. echo %SESSIONNAME% ---> When a person connects to a terminal server session, the                                                                          SESSIONNAME can be seen. But since this is a local terminal                                                     it simply displays 'console'.   echo  %APPDATA% ----> It shows the directory location where applications store their data.

Operating Systems 1 Lab 4 – DOS Batch File Creation

Image
This weeks lab #4, we make a .bat file that will automatically take any .txt file with the name "ReallyImportantProgram" and any number in front of e.g. 1 or 2 etc.., and it will put it into a folder called BackupFolder. First we create two text files and put text into it. We then make a .bat file and put this code into it        "      mkdir BackupFolder copy  ReallyImportant*.txt BackupFolder      dir BackupFolder    " When this bat file is run it will put the two text files created into a folder called BackupFolder. The one problem I found is with the instruction, we were told to type in " Type in MakeABackup", This did not work for me and I don't think it will work for anyone at all since MakeABackup is not recognised by cmd. What will work though is, typing in BackupFolder or BackupFolder.bat, this will call the .bat file and run it.