Well yes.. Sort of like if i was to choose a file from C:\Users\Ahmed.C\Documents\Anno 1404\Savegames it will only be like "C:\Users\Ahmed.C\Documents\Anno 1404\Savegames" and not like C:\Users\Ahmed.C\Documents\Anno 1404\Savegames\chosesnfile.ini"
But how would I make it such that when i open a certain file from a directory, the textbox text should be C:\Users\Ahmed.C\Documents\Anno 1404\Savegames and not C:\Users\Ahmed.C\Documents\Anno 1404\Savegames\chosenfile.ini ?
I dont know whether there are any inbuilt options,but, I will give you the algorithm to your problem and you should code it probably. If any doubts in your code,Kindly post the code so that we can help further.
First store the path in a string
count the "\" in the string(path).
Loop with the condition to find the the "\" in the string.
so parse the string, If a "\" is encountered, Save the string in a temp variable.
Then repeat the process until count is equal to the value, count=count-1;
if count=count-1, print the temp variable data. It will be your necessary output.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.