07-24-2023, 09:53 AM
I am a beginner in JScript , i did a program to remove a file from folder to another in JScript , but each time i need to change those path if i gave it to another person it depends on their path in their computer. So they ask me to do a txt file which they change only the informations below and then the JScript will change either .
enter code here
the JScript :
MoveFile2Desktop(filespec)
{var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.MoveFile(filespec, "c:\\windows\\desktop\\");
}
and i have a .txt file which contains
Source: P:\Desktop\name.txt
Destination : P:\Desktop\Folder1\name.txt
How can i read these 2 information and replace it in a JScript ?
enter code here
the JScript :
MoveFile2Desktop(filespec)
{var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.MoveFile(filespec, "c:\\windows\\desktop\\");
}
and i have a .txt file which contains
Source: P:\Desktop\name.txt
Destination : P:\Desktop\Folder1\name.txt
How can i read these 2 information and replace it in a JScript ?