Thoth Posted July 1, 2003 Posted July 1, 2003 I have a program that calls a Photoshop droplet with a process. I want this droplet to do some work on all the files in a directory, so I want to call the directory with: 'proc is declared as New Process proc.StartInfo.Arguments = "c:\letspretendthisisthefolder" Is that fine? Or do I need to do something like "c:\letspretendthisisthefolder\*" to tell it to take everything inside that directory? Quote Still getting my head around this ADO stuff... sigh.
Martin Posted July 1, 2003 Posted July 1, 2003 I don't know much about Photoshop droplets, but Id assume that you would just pass the directory argument as a c:\path, rather than with a *, because what else is it going to do with a directory other than look inside it.... Quote
Thoth Posted July 1, 2003 Author Posted July 1, 2003 The Photoshop droplet is just an .exe. So that looks like it will work, but I'll try both things just to be safe. Quote Still getting my head around this ADO stuff... sigh.
Thoth Posted September 4, 2003 Author Posted September 4, 2003 It looks like I'm still having this problem... when I pass the pathname as an Argument with Process.StartInfo.Arguments, the droplet loads, but says that the droplet could not be run because the file could not be found, the file in this case being a directory. What is the proper way to pass a folder as an argument in a Process? Quote Still getting my head around this ADO stuff... sigh.
*Experts* mutant Posted September 4, 2003 *Experts* Posted September 4, 2003 There shouldnt be anything wrong with your code, are you sure that is the only argument that the exe accepts or maybe you need something else. Are you sure you can pass in the directory? Maybe you could try passing in a file name. Quote
Thoth Posted September 4, 2003 Author Posted September 4, 2003 I need to load multiple files into a Photoshop droplet. Here is my code: Dim runDroplet As New Process 'Name of the droplet. runDroplet.StartInfo.FileName = "PHAction.exe" 'Folder where droplet is located. runDroplet.StartInfo.WorkingDirectory = CStr(regKey.GetValue("DropletLocation", System.Reflection.Assembly.GetExecutingAssembly.Location.ToString)) 'Directory where files are located, the Remove method removes the last '\' character in the folder. Dim DropletDirectory As String = strDropletInputFolder.Remove(strDropletInputFolder.Length - 1, 1) runDroplet.StartInfo.Arguments = DropletDirectory runDroplet.Start() 'Wait for Photoshop to do work on the files before continuing the process. runDroplet.WaitForExit() I guess I could a For Each loop for every file in the directory. Quote Still getting my head around this ADO stuff... sigh.
Thoth Posted September 4, 2003 Author Posted September 4, 2003 The For Each loop doesn't solve the problem. I get this error message every time the Droplet is called with an argument: Cannot run droplet because file cannot be found. This error message comes from inside Photoshop, which means the droplet itself is opening properly. However, dragging the files manually onto the droplet works just fine. Agh, I don't understand. Quote Still getting my head around this ADO stuff... sigh.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.