Sign in to follow this  
Followers 0
pintas

Need help with command line

8 posts in this topic

Hi,

I've been trying to use a command line to use eraserl with autoit but i can't. My idea was to copy eraserl.exe and eraser.dll to %AppData% and delete a folder called experiment in %AppData%, and after that to delete the both eraserl.exe and eraser.dll. I've been using the following:

FileCopy(@ScriptDir & "\Data\Eraserl.exe", @AppDataDir, 1)
FileCopy(@ScriptDir & "\Data\Eraser.dll", @AppDataDir, 1)
RunWait(@AppDataDir & '\Eraserl.exe -folder "%AppData%\experiment" -subfolders -method DoD_E -results -resultsonerror')
If FileExists(@AppDataDir & "\Eraserl.exe") Then FileDelete(@AppDataDir & "\Eraserl.exe")
If FileExists(@AppDataDir & "\Eraser.dll") Then FileDelete(@AppDataDir & "\Eraser.dll")

But i'm getting a "There's nothing to erase." error.

This command line:

Eraserl.exe -folder "%AppData%\experiment" -subfolders -method DoD_E -results -resultsonerror

Works like a charm, but not in AutoIt.

What am i doing wrong?

Thanks.

P.S.: I'm sorry i've posted this in another place but i couldn't edit it again to delete it...

Share this post


Link to post
Share on other sites



Hi,

I've been trying to use a command line to use eraserl with autoit but i can't. My idea was to copy eraserl.exe and eraser.dll to %AppData% and delete a folder called experiment in %AppData%, and after that to delete the both eraserl.exe and eraser.dll. I've been using the following:

FileCopy(@ScriptDir & "\Data\Eraserl.exe", @AppDataDir, 1)
FileCopy(@ScriptDir & "\Data\Eraser.dll", @AppDataDir, 1)
RunWait(@AppDataDir & '\Eraserl.exe -folder "%AppData%\experiment" -subfolders -method DoD_E -results -resultsonerror')
If FileExists(@AppDataDir & "\Eraserl.exe") Then FileDelete(@AppDataDir & "\Eraserl.exe")
If FileExists(@AppDataDir & "\Eraser.dll") Then FileDelete(@AppDataDir & "\Eraser.dll")

But i'm getting a "There's nothing to erase." error.

This command line:

Eraserl.exe -folder "%AppData%\experiment" -subfolders -method DoD_E -results -resultsonerror

Works like a charm, but not in AutoIt.

What am i doing wrong?

Thanks.

P.S.: I'm sorry i've posted this in another place but i couldn't edit it again to delete it...

Try

FileCopy(@ScriptDir & "\Data\Eraserl.exe", @AppDataDir, 1)
FileCopy(@ScriptDir & "\Data\Eraser.dll", @AppDataDir, 1)
RunWait(@AppDataDir & "\Eraserl.exe -folder " & @AppDataDir & "\experiment -subfolders -method DoD_E -results -resultsonerror")
If FileExists(@AppDataDir & "\Eraserl.exe") Then FileDelete(@AppDataDir & "\Eraserl.exe")
If FileExists(@AppDataDir & "\Eraser.dll") Then FileDelete(@AppDataDir & "\Eraser.dll")

Share this post


Link to post
Share on other sites

Thanks for replying so fast ;)

I get a error saying " Unrecognized parameter 'and' " :D

Share this post


Link to post
Share on other sites

Try adding single quotes. Like this

FileCopy(@ScriptDir & "\Data\Eraserl.exe", @AppDataDir, 1)
FileCopy(@ScriptDir & "\Data\Eraser.dll", @AppDataDir, 1)
RunWait(@AppDataDir & "\Eraserl.exe -folder '" & @AppDataDir & "\experiment' -subfolders -method DoD_E -results -resultsonerror")
If FileExists(@AppDataDir & "\Eraserl.exe") Then FileDelete(@AppDataDir & "\Eraserl.exe")
If FileExists(@AppDataDir & "\Eraser.dll") Then FileDelete(@AppDataDir & "\Eraser.dll")

Also a little more info would help. Maybe the full error?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Get the same error....

This is the full error... (see attachment)

The line in cmd is correct, but i cannot replicate it in autoit... ;)

post-38990-1218840448_thumb.jpg

Edited by pintas

Share this post


Link to post
Share on other sites

Ok I think I see what's wrong but maybe not. Try this.

$options = "-folder '" & @AppDataDir & "\experiment' -subfolders -method DoD_E -results -resultsonerror"

FileCopy(@ScriptDir & "\Data\Eraserl.exe", @AppDataDir, 1)
FileCopy(@ScriptDir & "\Data\Eraser.dll", @AppDataDir, 1)
RunWait(@AppDataDir & "\Eraserl.exe " & $options)
If FileExists(@AppDataDir & "\Eraserl.exe") Then FileDelete(@AppDataDir & "\Eraserl.exe")
If FileExists(@AppDataDir & "\Eraser.dll") Then FileDelete(@AppDataDir & "\Eraser.dll")

If that works it was see the & in the code as an & in the sent data and not as just part of the script.

Share this post


Link to post
Share on other sites

No, same thing ;) It seems to input an unacepted 'and' command.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0