Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 493 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access the commandline from JScript

#1
I am trying to write a windows JS script that iterates through a bunch of folders and deletes each one with a special program because for some reason these folders don't delete normally. My problem is that I can't figure out how to just simply run a command on the command line like you would in a batch file. Obviously, you can't just call it directly, but I've googled and googled and can't find anything.

The command string I want to run is `"C:\Program Files\Unlocker\Unlocker.exe" "E:\.Trash-1000\expunged\2443302239\recup_dir.275" -D`. If someone could write me out a simple script that can do this, that would be great. Also, if you could put it in a for loop from 100 to 999 and replace the 275 with the loop var that would be even better.
Reply

#2
Here's the code.

cmdPrefix='"C:\Program Files\Unlocker\Unlocker.exe" "';
dirPrefix='E:\.Trash-1000\expunged\2443302239\recup_dir.';
dirSuffix='';
cmdSuffix='" -D';
showUI=true;
shell=WScript.CreateObject('WScript.Shell');
fso=WScript.CreateObject('Scripting.FileSystemObject');
for (i=100; i<=999; i++) {
folder=dirPrefix+i+dirSuffix;
if (fso.FolderExists(folder)) {
shell.Run(cmdPrefix+folder+cmdSuffix, showUI?1:0, true);
}
}
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through