Using Excel Spreadsheets As Trigger And Datafiles S’abonner

0
Avatar
Legacy Poster

I am a new Bartender user.  We're trying to use Commander/Bartender as a standalone process to monitor a folder and print labels for a named spreadsheet that is dropped into the folder.  The mechanics of the process that Commander/Bartender uses would work fine for us but the break occurs because we use .xls files not .txt files.  That issue, coupled with the timing of the file rename process in Commander makes it very difficult to use spreadsheets.  If Commander would simply start Bartender and delete/rename the Trigger file at the end of the process rather than the beginning, we would be ok.

 

Commander immediately renames the spreadsheet to another extension at the start of the process - we can fake it out by dropping the file into the folder as a .xlsx file, then renaming it to .xls  --- this lets the labels print just fine.  But then I'm left with the trigger/datafile that I can't delete (apparently \DD only works for txt files).  I could live with this workaround if I could just delete the file after Bartender closes. Maybe add some sort of Commander/Bartender/etc. Scripting?

 

I would appreciate any ideas you may have.

Thank You,

David Avery 

6 commentaires

0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

Use and Operating System command to run a couple of command lines:

 

cmd.exe /C CHOICE /T 5 /D Y

cmd.exe /C DEL "%Trigger File Name%"

 

The first introduces a delay of 5 seconds, then second deletes the renamed trigger file.

 

*Note: I've not tested this myself, but perhaps with a tweak it should work.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Thanks for the response Ian.
How/where can I put Command Lines, like those you illustrate, into Commander Tasks?
Regards,
David
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

Under the "Commands" tab of the task in question, create an additional command under the previous, but this time selecting an "Operating System" command.  Note that in general, each task can result in multiple commands being executed.  In the dialog for this command your can enter in the command lines I gave above.  Some experimentation might be needed.  Good luck!

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

Ian - Sorry to be dense - I've been trying to embed your commands in my Task without success. I don't mind experimentation but I'm not making any headway. Could you (or another user) give me an example of a working Task Command line that executes DOS commands. Many Thanks
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I'm also getting an error trying to start cmd.exe from the Task Commands -- The program does exist in the specified directory.


The error is BarTender :Error Message # 3323

The file "C:\WINDOWS\system32\cmd.exe" is not a supported file type.


I just can't get these to run.
Thanks,
David
0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

The cmd.exe file is a Windows system application.  It's basically the old DOS style command prompt in a Windows app.  I suggest you Google, "cannot find cmd.exe" for various suggestions on how to fix that.  Using a cmd.exe command line is the easiest way to do what you want to do.  An alternative is to write a VB script that deletes the file as well, and call the VB script via the Operating System command, but that just adds to the complexity.

 

It should be noted that Commander is not designed to use Excel files as a trigger.  This is why we have square peg in round hole difficulties here. 

Vous devez vous connecter pour laisser un commentaire.