1.

Solve : autoexec.bat question?

Answer»

Hi everyone,

i GOT a autoexec.bat commad which show below:

cd\union\pm
ren hostordr.ord hostordr.321
COPY hostordr.321 hostordr.ord
del hostordr.321
uk_host
cd\

This command is suppose to create a new storage address for hostordr.ord whenever i reboot the system, so that the address is not constantly rd/wr and hence prevent the specific address from bad sector.

the question i want to ask is

1. Supposingly over numerous time of rebooting system, my whole harddisk should be fully occupied by old hostordr.ord files am i right? But when i run scandisk i only see first few CLUSTER of the HD being occupied, but not all of the HD.
So is this command actually always writing to a new storage address or is constantly using a specific memory location only?

2. I discover some bad sectors when running scandisk in DOS OS, does the bad sectors arrise because of my autoexec command?

3. Is there a better way for my command to always update hostordr.ord to a new storage address when reboot?

Quote from: ck123 on November 01, 2007, 07:02:57 PM

Hi everyone,

i got a autoexec.bat commad which show below:

cd\union\pm
ren hostordr.ord hostordr.321
copy hostordr.321 hostordr.ord
del hostordr.321
uk_host
cd\

This command is suppose to create a new storage address for hostordr.ord whenever i reboot the system, so that the address is not constantly rd/wr and hence prevent the specific address from bad sector.

the question i want to ask is

1. Supposingly over numerous time of rebooting system, my whole harddisk should be fully occupied by old hostordr.ord files am i right?

No. This sequence of lines first RENAMES a file then makes a copy with the original name then deletes the copy so you end up with the same number of files as before.

ren hostordr.ord hostordr.321
copy hostordr.321 hostordr.ord
del hostordr.321

Quote
But when i run scandisk i only see first few cluster of the HD being occupied, but not all of the HD.


See above.

Quote
So is this command actually always writing to a new storage address or is constantly using a specific memory location only?

When a file is renamed, the FAT (File Allocation Table) is updated, but the file data is not altered. Copying the file will mean a new area of the DISK is used, then when the file is deleted, the data remains but, again, the FAT is updated to show that area is available for reuse if needed later.

Quote
2. I discover some bad sectors when running scandisk in DOS OS, does the bad sectors arrise because of my autoexec command?

No.

Quote
3. Is there a better way for my command to always update hostordr.ord to a new storage address when reboot?

1. The autoexec does not do what you think it does.
2. You do not need to do this anyway. Reads & writes do not wear out the disk. Bad sectors found by Scandisk may be a sign that disk is failing though.




Discussion

No Comment Found