p9 Ins Vedant

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

FACULTY OF TECHNOLOGY

Department of Information Technology


01IT0611-Information & Network Security

Practical-9
9.Aim: Write a program that creates a shortcut file.
Code:
@echo off
set /p source="Enter the full path of the file: "
set /p shortcut="Enter the full path for the shortcut: "
mklink "%shortcut%"
"%source%"
echo Shortcut created successfully!
Pause

Save the file with a .bat extension, for example, create, shortcut.bat. Double-click on the
create_shortcut.bar file to run the script.

When prompted, enter the full path of the file for which you want to create a shortcut, and then
enter the full path where you want to create the shortcut file. If the shortcut was createdsuccessfully,
you should see the message "Shortcut created successfully!" displayed in the command prompt
window.

Jay Limbad (92210104002) 20


FACULTY OF TECHNOLOGY
Department of Information Technology
01IT0611-Information & Network Security

Jay Limbad (92210104002) 21

You might also like