Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MoveFileEx and wininit.ini question

Status
Not open for further replies.

Baal80

Programmer
Aug 14, 2004
14
PL
Hi,
I need to delete a directory on reboot. Therefore I have 2 questions:
1)Does MoveFileEx (when destination is NULL) works with directories or only with files?
2)On Win95/98/Me I need to write values to wininit.ini file. Can I write the name of a DIRECTORY there or again - only a filename (in 8.3 format of course)?

Thanks!
Baal80
 
1) I would assume so since my notes indicate the only restriction with MoveFileEx and directories is that "When moving a directory, the destination must be on the same drive."

2) It's been so long since I've use Win9X, I don't remember.

James P. Cottingham
-----------------------------------------
To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.
 
Thanks for your reply 2ffat but I've checked this and it WORKS with dirs even if the dir you want to delete is for example on drive D and you move it to drive C:\\NULL :) Maybe it is some kind of exception?
 
Are C: and D: on the same physical drive?


James P. Cottingham
-----------------------------------------
To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.
 
I suspect that MoveFileEx works on the same physical drive no matter what their logical names are. If C: and D: were on different physical drives then I would be very surprised that MoveFileEx worked.

James P. Cottingham
-----------------------------------------
To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.
 
About the second question,
you can write any string in the ini file, like the Directory, or the file name.

--- LastCyborg ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top