473,379 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

How can I change the root path that an application uses to upload a file from?

I have an application which is used for calibration for electrical components. Here I want to set a rootpath for this application. I did some research and I found out that I can get the rootpath of the application (that is where the exe is stored) But what I am really looking for is once I start the application the root path should be what I assign. For instance currently the root path is "C:\Users\Public\Documents\ABC.Tools\Projects" but I would like the root path to be "E:\New ABC\"
Is this possible? I wrote some code where I call the exe of the application and it opens the file in a folder that I specify :


Expand|Select|Wrap|Line Numbers
  1. private void NewJournal_Click(object sender, EventArgs e)
  2. {
  3.  
  4. string filePath = @"E:\New ABC\abc.vnalog"
  5. if (!File.Exists(filePath))
  6. {
  7. return;
  8. }
  9.  
  10. string SelectedFile = @"/select, " + filePath;
  11. System.Diagnostics.Process.Start(@"E:\New ABC\abc.vnalog", SelectedFile);
  12.  
  13. }
  14.  
Now this code open the .vnalog file in the application. And this works great..!!! How can I now change the path within the application?
Thanks in advance for your help.
Mar 12 '13 #1
1 1369
weaknessforcats
9,208 Expert Mod 8TB
This path in Windows:

"E:\New ABC\abc.vnalog"

is this path in C/C++

"E:\\New ABC\\abc.vnalog"

since the \ is an escape sequence.
Mar 12 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Geoff Berrow | last post by:
I have an input box for uploading image files <input type="file" name="userfile" size="35" > This works upload from my machine, but if I paste in a URL, the following: if...
0
by: new to add-in | last post by:
In asp.net/c#, it's easy to implement Upload file to web server, just use Request.Files or Request.InputStream & runat=server form and type=file input controls. But now, it's a problem for me how...
2
by: Daniel López | last post by:
Anyone know how can I upload a file to a PHP Web Form from a C# Windows Application ? I've tried to use WebClient.UploadFile("path_file_to_upload","url_of_php_form"); but with this I don't...
2
by: Stephen | last post by:
I need some help with this. I have two files page.aspx: A page that a user calls uc.ascx: A user control that page.aspx uses. The ascx file has HTML used for a site background which would...
3
by: Beatrice | last post by:
I am stuck with this problem and desperately need your help. I would like to upload an xml file or any file from client machine and then save it to the server machine. Since the file path on the...
1
by: Dsperry101 via AccessMonster.com | last post by:
Hi Everyone, I have a work order database . I am trying to allow user's to attach files to the workorder (ie cad dwq's , text files , pdfs, pictures etc) I have the attachment logic resolved but...
4
by: Chris | last post by:
Hello, I am using asp.net. I have been searching this for a while, but dint find any solution yet. Any help will be appreciated. I have a string variable say 'myFile' that has complete path of...
0
by: asindoro | last post by:
hello, i'm make some script like this : <? $koneksi = ftp_connect("ftp.aaa.com"); $ftp_username = "asaaa"; $ftp_password = "12345"; $login = ftp_login($koneksi, $ftp_username,...
2
by: praveenkumarvpk | last post by:
Hi friends Please help me! Following is my servlet-code import java.util.Enumeration; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import...
1
by: raamay | last post by:
i have a form via which a member can register and upload his resume (CV). Now, i just can figure out how it can be done via a single form. I want the users record to be inserted in the database...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.