Click here to Skip to main content
15,909,939 members
Home / Discussions / C#
   

C#

 
Questionlost connection on WebService Pin
goldsoft10-Jul-11 22:29
goldsoft10-Jul-11 22:29 
AnswerRe: lost connection on WebService Pin
Dave Kreskowiak11-Jul-11 1:05
mveDave Kreskowiak11-Jul-11 1:05 
AnswerRe: lost connection on WebService Pin
DaveAuld11-Jul-11 23:05
professionalDaveAuld11-Jul-11 23:05 
QuestionDelete a File - "File does not exist" Pin
phisco12310-Jul-11 6:44
phisco12310-Jul-11 6:44 
AnswerRe: Delete a File - "File does not exist" Pin
Dr.Walt Fair, PE10-Jul-11 8:49
professionalDr.Walt Fair, PE10-Jul-11 8:49 
AnswerRe: Delete a File - "File does not exist" Pin
Heath Stewart10-Jul-11 16:15
protectorHeath Stewart10-Jul-11 16:15 
GeneralRe: Delete a File - "File does not exist" Pin
Ennis Ray Lynch, Jr.11-Jul-11 5:31
Ennis Ray Lynch, Jr.11-Jul-11 5:31 
GeneralRe: Delete a File - "File does not exist" Pin
Herboren11-Jul-11 5:41
Herboren11-Jul-11 5:41 
The user could also try setting a static setting of the directory location within his application under compile options and then just specify the file name which he is trying to delete.

Try creating a setting, string string ie: string FilePath = "%USEPROFILE%.\\Desktop\\DirectoryToFile\\" (or where ever your path is located)

Then in your application just add the Filename to the path, so that way you know that your application is pointing to the location, it would be concrete. Of course however if it is still saying that the file doesnt exists, make sure you are spelling it correctly and including the applications extension(which I'm not saying you aren't) and make sure you use the Try::catch, which is vital in this situation.

<pre>

String FILE_TO_DELETE = FilePath+FileName;
Try
if.exists(FILE_TO_DELETE) then
FILE_TO_DELETE.delete
end if
catch ex as exception
msgbox("Unable to delete file. Reason: ", ex);
end try

</pre>

And with the benefit of setting a static path in your program, you can change the path at anytime and save its settings easily. because as long as your code includes the "String FILE_TO_DELETE = FilePath+FileName;" That string will always change, just not your code.
GeneralRe: Delete a File - "File does not exist" Pin
phisco12311-Jul-11 7:11
phisco12311-Jul-11 7:11 
QuestionCode Sends Me To A New Page Before Completion Pin
PDTUM10-Jul-11 4:42
PDTUM10-Jul-11 4:42 
AnswerRe: Code Sends Me To A New Page Before Completion Pin
Richard MacCutchan10-Jul-11 5:27
mveRichard MacCutchan10-Jul-11 5:27 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
PDTUM11-Jul-11 4:07
PDTUM11-Jul-11 4:07 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
Richard MacCutchan11-Jul-11 4:55
mveRichard MacCutchan11-Jul-11 4:55 
AnswerRe: Code Sends Me To A New Page Before Completion Pin
BobJanova10-Jul-11 22:17
BobJanova10-Jul-11 22:17 
GeneralRe: Code Sends Me To A New Page Before Completion Pin
PDTUM11-Jul-11 4:11
PDTUM11-Jul-11 4:11 
QuestionControlMessage Pin
Snow White_10-Jul-11 2:13
Snow White_10-Jul-11 2:13 
AnswerRe: ControlMessage Pin
Dave Kreskowiak10-Jul-11 3:44
mveDave Kreskowiak10-Jul-11 3:44 
AnswerRe: ControlMessage Pin
thatraja10-Jul-11 9:27
professionalthatraja10-Jul-11 9:27 
Questionunblock some item in form Pin
abdellah ab9-Jul-11 8:30
abdellah ab9-Jul-11 8:30 
AnswerRe: unblock some item in form Pin
Heath Stewart9-Jul-11 8:55
protectorHeath Stewart9-Jul-11 8:55 
AnswerRe: unblock some item in form Pin
DaveAuld9-Jul-11 9:05
professionalDaveAuld9-Jul-11 9:05 
AnswerRe: unblock some item in form Pin
Dr.Walt Fair, PE9-Jul-11 10:38
professionalDr.Walt Fair, PE9-Jul-11 10:38 
GeneralRe: unblock some item in form Pin
BobJanova10-Jul-11 22:19
BobJanova10-Jul-11 22:19 
GeneralRe: unblock some item in form Pin
DaveAuld11-Jul-11 2:47
professionalDaveAuld11-Jul-11 2:47 
GeneralRe: unblock some item in form Pin
BobJanova11-Jul-11 3:37
BobJanova11-Jul-11 3:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.