Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Set dir=C:\Users\sree\Desktop\sivaTempFile


But i want like this

Set dir=~\Desktop\sivaTempFile
Posted

1 solution

No.
"~" syntax is only used with IIS (and similar web hosting software) as the root directory of the current web application. It is not available outside IIS.

You can always create the batch file appropriately for each system by writing the batc file from inside you website, and using "~" there:

C#
string setRoot = string.Format("SET ROOTDIR=\"{0}\"\n", Server.MapPath("~"));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900