Need help in CreateTextFile Method of VBScript.
My aim is to create a text file in the given drive. For e.g. if user passes C then file should be created in c drive, if the user passes D , then file should be created in d drive.
I did the following code,
GivenDrive=Inputbox("Enter the drive name:")
If (fso.DriveExists(GivenDrive)) Then
In the above code, inside if condition , I want to do the following,
Set MyFile=fso.createtextfile("<file_name>",True )
Here the problem is I need to concatenate the drive letter and file name (for e.g "C"&":\"&"<file_name>")
Can anybody tell how to do this , i.e how to pass concatenated string as a parameter which expects string expression?
Re: Need help in CreateTextFile Method of VBScript.
DriveLetter = "c:\"
FileName = "Readme.wri"
FullPath = DriveLetter & FileName