15,922,584 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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?