Jump to content

Path from script to workflow folder?


Recommended Posts

Hi.

 

I try to write my first workflow. This one should disconnect my TimeCapsule from the Internet and reconnect it to get a new IP-Address. To get it to work i'm used to put a .jar file in the workflow folder. Then i had to call the file with parameters like that...

 

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/Java -jar /Users/Thomas/JavaDisconnect.jar 192.168.0.1

 

Everything works fine when the path to the .jar file is hardcoded as shown above. But if i put the file in the workflow folder, the path looks like that

 

/Users/Thomas/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.971DF35A-C2CD-49FD-9169-55226D1F406A.971DF35A-C2CD-49FD-9169-55226D1F406A

 

Can anyone please give me an advice how to reach the workflow path variable!?

 

Thanx in advance

Thomas

Edited by Thomas Klein
Link to comment

Hi.

 

I try to write my first workflow. This one should disconnect my TimeCapsule from the Internet and reconnect it to get a new IP-Address. To get it to work i'm used to put a .jar file in the workflow folder. Then i had to call the file with parameters like that...

 

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/Java -jar /Users/Thomas/JavaDisconnect.jar 192.168.0.1

 

Everything works fine when the path to the .jar file is hardcoded as shown above. But if i put the file in the workflow folder, the path looks like that

 

/Users/Thomas/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.971DF35A-C2CD-49FD-9169-55226D1F406A.971DF35A-C2CD-49FD-9169-55226D1F406A

 

Can anyone please give me an advice how to reach the workflow path variable!?

 

Thanx in advance

Thomas

 

When executing scripts, you are running from that path so you could specify path to the java executable and then just give path to the jar file as ./JavaDisconnect.jar or just JavaDisconnect.jar (that is unless you've cd'd out of that path in the script)

Link to comment

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...