A command-line interface tool for performing various file operations across different operating systems (Windows, Linux, and macOS).
- Cross-platform support (Windows, Linux, macOS)
- File operations:
- Create files
- Delete files
- Rename files
- Command piping
- Interactive help system
- Support for multiple file extensions (.txt, .pdf, .docx)
git clone https://github.com/geo-afk/custom-shell.git
cd custom-shellRun the program:
python main.pycreate <filename>- Create a new filedelete <filename>- Delete an existing filerename <filename>- Rename an existing file (prompts for new name)help- Display general help informationhelp <command>- Display help for a specific commandc- Clear the screene- Exit the program
The tool supports basic command piping using <, >, and | operators.
>> create test.txt
>> rename test.txt
Enter new filename: newtest.txt
>> delete newtest.txtmain.py- Entry point and main program loopcompute.py- Handles execution of file operationsinput_parser.py- Parses and validates user inputhelp_parser.py- Manages the help system.\static\constant_types.py- Defines constants, enums, and type definitions.\static\exceptions- Definition of custom exceptions.\static\help.json- Stores the help details for commandGeneralSpecific
- Python 3.x
- Automatically detects the operating system
- Adjusts commands based on the platform
- Validates file extensions
- Checks for valid operations
- Parses piped commands
- Custom exceptions for various error scenarios
- User-friendly error messages
- General for all commands
- Specific help for a certain command ex:
help <create>
The tool uses custom exceptions:
InvalidCommand- For invalid user inputsFileOperationError- For file-related errorsCommonException- For general errors
To add new file operations:
- Limited to basic file operations
- Supports only .txt, .pdf, and .docx file extensions
- Basic command piping functionality