Re: deleting files

new topic     » goto parent     » topic index » view thread      » older message » newer message

My usual approach to things like this is:

1. make sure I can delete the file manually - including while your program is running - maybe it's in use.

2. hard-code the file name and path in the delete_file() call, so you know it is correct, i.e. not being mangled in some way, perhaps excess or missing slashes, etc. IOW, pass delete_file() a plain old string and see what happens.

3. if the hard-coded file is deleted, then obviously previous code which builds the file/path is buggy. Add display() at each step and work your way backward until you find the place it goes wrong.

BTW: what's with the puts(1,to_string(FileName) & " ") ? Does the filename look different if you just use puts(1,FileName & " ")

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu