Answer» I need to perform a stress test on usb flash drive But i don't know how to start it. My idea is write an automated program to let system copy FILE from hdd to usb,then delete it after store in usb,then copy another file from usb to hdd. can anybody here help me this? thanks.You'll need to fill in the filename.ext and use the correct drive letter for the usb drive, but this may help.
Code: [Select]@echo off set usbdrive=i:\ for /l %%x in (1,1,99) do ( copy filename.ext %usbdrive% del %usbdrive%filename.ext )
If looping the code 99 times seems like OVERKILL, feel free to change it.
Note: As written, the code will copy the same file repetitively, just be sure to choose a file that fits on the drive. does this program must run under dos mode(boot from usb bootable dos)?
the usbdrive is my flashdrive?which where it boot from?
the file.ext should PUT in hdd?The original script was written for the XP cmd processor. It will probably run under Win2000 and Vista.
I didn't know DOS supported USB but this snippet should run in all versions of MS or PC DOS.
@echo off :loop copy filename.ext usbdrive:\ del usbdrive:\filename.ext goto loop
The yellow highlight is name of the file on the HDD. Use a fully qualified PATH if necessary.
The red highlight is the drive letter of the USB drive.
Oh YEAH, the script is an infinite loop. You can kill it with CTL-C.
|