You are here

Issue with Secure command in Multi-Line Script from Command Line

10 posts / 0 new
Last post
Brook
Offline
Last seen: 14 years 11 months ago
Joined: 2009-04-10 15:32
Issue with Secure command in Multi-Line Script from Command Line

Hello,

First, love the program and really appreciate all the work on it.

Unfortunaly, I think I have to come to you with a problem. I am trying to run a multiline script from the command line (Script "Sync_Files"):
Sync "Directory_1"
Sync "Directory_2"
Secure "Decrypt_Directory_3"
Sync "Directory_3"
Secure "Encrypt_Directory_3"

As you can see, the script includes Secure commands. Per the manual you are supposed to use the syntax: Toucan Script scriptname passowrd repeatpassword. (Might want to look into that typo too. Wink The passwords are then used for any required password entry for the commands.

Here is the command I use: Toucan Script Sync_File Pass_Word Pass_Word. When I run it I immediately get an error telling me: You have specified the wrong number of options.

Just to see if it would work, since I have 2 Secure commands I've also tried including the password twice (Toucan Script Sync_File Pass_Word Pass_Word Pass_Word Pass_Word) I get another error: You need to repeat the password and ensure the passwords are identical.

And finally, just to really poke at it, I also tried including the password in the script:
Sync "Directory_1"
Sync "Directory_2"
Secure "Decrypt_Directory_3" "Pass_Word" "Pass_Word"
Sync "Directory_3"
Secure "Encrypt_Directory_3" "Pass_Word" "Pass_Word"

Obviously that didn't work either. Could I get a little help with this?

Appreciate It,

Brook

Brook
Offline
Last seen: 14 years 11 months ago
Joined: 2009-04-10 15:32
Addendum

I should have mentioned: Toucan 2.0.7, Windows XP SP3. And I've also tried various forms of quotes around the command line entries.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 6 months ago
Developer
Joined: 2005-12-10 15:22
Sounds

like I bug to me, I shall take a look back and hopefully get back with more info in the next day or so. Fixed the typo already though Wink

Thanks for the feedback!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 6 months ago
Developer
Joined: 2005-12-10 15:22
This

should be fixed in the latest pre-release, if you could confirm that would be great Smile

Brook
Offline
Last seen: 14 years 11 months ago
Joined: 2009-04-10 15:32
Pre-Release Testing

I'm still working on testing, but I thought you might want to hear what I've gotten so far. I tried running the script from command line. First, I received no errors. Watching the prompts the script ran through the first job. After that though the script seemed to hang. I let it run for about 1 hour, 45 minutes with no further progress before I closed down the DOS box.

I've since run each job through via GUI and all run fine. I'm dealing with about 2GB of data total. The (3) longest jobs, (1) sync and the encrypt & decrypt jobs, took about 15 minutes each. It's possible the script was just taking a long time.

Right now I am testing each job of the script via command line. Once that is done I will run the whole script again to see if it goes through.

Unfortunately, found one more possible bug to report: The Preview function under the Sync tab doesn't seem to work if you use the @Drive@ variable (maybe others?) in the destination string. It will display the top level destination directory, but not the files or the sub-directories under it. (i.e. @drive@\Directory ... Sub-Directory, File, File, File...)

I'll have more info for you when I start testing again tomorrow.

Thanks Again,

Brook

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 6 months ago
Developer
Joined: 2005-12-10 15:22
Ahhh,

thanks, I have fixed the preview bug Smile

I shall have another look into the script stuff, sounds like it is getting closer though, and thanks for all the testing so far, it is much appreciated.

Brook
Offline
Last seen: 14 years 11 months ago
Joined: 2009-04-10 15:32
More Testing

Hey Again,

No problem, if you write it I'll test it. It only seems fair.

Think I'm done with testing now. I tested each job, both in the GUI & by command line. They all ran fine independantly. Then I ran the whole script and unfortunately things broke when I ran it by command line.

I put new files strategically within the directories to keep an eye on progress through the script without having to do a full copy each test. The Sync jobs ran fine, copying or deleting the new files. When it hit the Secure jobs though it stalled out after the first file.

I first tried the original script against an encrypted directory and it decrypted one file in the root directory and then stalled. I then ran a decrypt job alone so the script would 'skip' the decrypt step and move on to the sync. When I ran the script again it got past the decrypt step, synced the files, encrypted one file and then stalled again. It looks like there is a problem with the Secure command when run as part of a script from within the command line.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 6 months ago
Developer
Joined: 2005-12-10 15:22
I

can confirm this is a very odd bug indeed, for some bizarre reason Toucan never notices that the encryption has finished on the first file when it is run from the command line, but it does it fine when run from the GUI, I am searching hard for why this is, but it is very very strange!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 6 months ago
Developer
Joined: 2005-12-10 15:22
Right

I think I have this fixed in the latest pre-release, if you could test that would be great.

Brook
Offline
Last seen: 14 years 11 months ago
Joined: 2009-04-10 15:32
Works Great

That worked Steve, appreciate it. Also, like the new features.

Something to think about: It would be nice if you could trigger a prompt box for encrypt/decrypt passwords from a command line run script. Right now I'm using PStart to trigger command line scripts from a menu item. I have to code the passwords into the command line behind the menu entry because PStart can't prompt & input a variable on its own. I don't think the PortableApp suite interface can either. But... just some wishful thinking.

Thanks for all the hard work,

Brook

Log in or register to post comments