Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2387 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello, I am struggling to make a send event work and I am running out of ideas so a bit of help is needed :)

I have a script which will create a file on the desktop and then email it. After it is created I want the file deleted. Here are the steps of the script which deal with this need:

The first one will create the path and filename to be created and then emailed

Set Variable [$file; Value: "filewin:"&Get ( DesktopPath )&Substitute( GetAsText ( Get ( CurrentDate ));"/";"")&"_Report.pdf"]

The second one will create a variable to be used in cmd as parameter for the del command

Set Variable [$filedelete; Value: Replace ( Substitute(  $file;"/";"\\");0;9;"")]

The last one is the send event step

Send Event ["aevt"; "odoc"; "cmd.exe del " &Quote($filedelete)]

Unfortunately this will not do the delete, I see the cmd window with path positioned on local desktop which I have moved on disk D ( D:\Desktop>).

Using data viewer I can see the value of $filedelete variable is correct, if I copy that value and paste it into cmd window the command will execute correctly.

What am I missing? Maybe I need to send the execute command after the line is send (like pressing enter from keyboard if you run the command from cmd)?

 

This topic is 2387 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.