Click here to Skip to main content
15,922,584 members

Comments by kuratazen (Top 4 by date)

kuratazen 23-Oct-17 15:33pm View    
Application.StartupPath was the fix in ProgramA. Blarg! I would have bet money that I had tried that already. Thanks Dave Kreskowiak.
kuratazen 23-Oct-17 15:09pm View    
Actually I think you are correct - my apologies. After some fumbling, I've determined that ProgramA actually IS looking in the folder that the MCP is running from instead of looking for the files in the same folder as ProgramA is located. I was using "Environment.CurrentDirectory" and combining that string with my file name, so no I wasn't just hoping for the best. I will take a look at the reference and try again. When it's working I'll post what the working combination is.
kuratazen 23-Oct-17 12:09pm View    
Thanks Dave - actually that's not the solution. I do see what you're saying, and I'll agree that having the full path is proper. Once I corrected the path, the called program still did not copy files like I wanted but would work when run manually.
kuratazen 20-Oct-17 15:25pm View    
Thanks for responding Richard.

The files are simple text files created with Notepad. I copied them into the folder manually. They just contain one line of text with the paths where files will be copied from and to. Nothing overly complicated. I have to collect log files from multiple machines (each with their own PC) and figured this would be an easy way to do it. So as an example I currently have four folders for four machines - each has the same program (ProgramA.exe in this example) but the files have different paths in them - I'm just using the text files so I can re-use the program rather than making four duplicate programs with the paths hard coded. Maybe I need to add the folders to the system's Path statement or something like that?