File manipulation means performing operations like creating, deleting, copying, and renaming files in the Windows Operating System. Files store data (text, images, videos, software, etc.), and Windows provides multiple ways to manage them:
- Graphical User Interface (GUI) → Using File Explorer.
- Command Line Interface (CLI) → Using Command Prompt (cmd) or PowerShell.
1. Creating a File
(a) Using GUI (File Explorer):
- Navigate to the folder where you want the file.
- Right-click → New → Choose file type (e.g., Text Document, Word Document).
- Give a name to the file and press Enter.
(b) Using Command Prompt:
cd Desktop
echo This is my first file > file1.txt
👉 This creates a text file named file1.txt
on the Desktop.
2. Deleting a File
(a) Using GUI:
- Select the file → Press Delete key (moves file to Recycle Bin).
- Press Shift + Delete → Permanently deletes file without Recycle Bin.
(b) Using Command Prompt:
del file1.txt
👉 Deletes the file named file1.txt
.
3. Copying a File
(a) Using GUI:
- Right-click file → Copy → Go to target folder → Paste.
- Shortcut: Ctrl + C (copy) and Ctrl + V (paste).
(b) Using Command Prompt:
copy file1.txt D:\Backup\
👉 Copies file1.txt
into the D:\Backup
folder.
4. Renaming a File
(a) Using GUI:
- Right-click file → Rename → Type new name → Press Enter.
- Or select file → Press F2 → Rename directly.
(b) Using Command Prompt:
rename file1.txt report.txt
👉 Renames file1.txt
to report.txt
.
✅ Summary Table for Windows File Manipulation
Operation | GUI (File Explorer) | Command Prompt Example |
---|---|---|
Create File | Right-click → New → File Type | echo Hello > file1.txt |
Delete File | Select → Delete / Shift+Delete | del file1.txt |
Copy File | Right-click → Copy → Paste | copy file1.txt D:\Backup\ |
Rename File | Right-click → Rename / F2 | rename file1.txt report.txt |