Go Back   PCMech Forums > Windows Support > Windows Legacy Support (XP and earlier)

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-15-2008, 07:26 PM   #1
Registered User
 
allburnintegrated's Avatar
 
Join Date: Sep 2004
Location: New Zealand
Posts: 186
Writing a batch file to copy many times

Hi guys

For a science fair project, I am going to test the effects of X-radiation on flash memory. I'm intending to fill a number of 16MB (15,876,096 byte) Compactflash cards with data, hash check the data with hkSFV, expose them to the radiation and hash check again for any data corruption.

The flash cards have a block size of 4KiB. To make the hash checking more 'accurate', I'd like to use many files which are as small as possible - this would be 3876 files of 4KiB each. However, I'm struggling to actually get 3876 4KiB files on a card, or onto my hard disk. It's easy enough to make a 4KiB file, just open notepad and write 4096 1s. I can't figure out how to make 3875 copies of this file though. If I use copy+paste in Windows XP, I get a 'disk is full or write-protected' error after about 1375 files, every time. I think it's a naming problem - I can never get above 'Copy of (999) file.txt'.

I think this could be done much better with a batch file. However my batch file writing skills are limited. Could anyone advise me on how to write a batch file which copies a file called 1.txt n times, with the filenames as 1+n.txt?
allburnintegrated is offline   Reply With Quote
Old 06-16-2008, 10:49 AM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
Check out the for-loop, SET, and XCOPY. I'll see if I can fiddle around with something later when I have a few minutes if you don't have something by then.

On a side note, would ASCII data be more or less prone to data corruption than binary data? (ie, and exe file) Might be something else to look into / think about.
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 06-16-2008, 10:56 AM   #3
Banned
 
Join Date: Jun 2008
Location: Detroit, MI
Posts: 495
Wow, interesting idea. I'd be interested in seeing the results (yeah, I'm a nerd NukeE).
vtfanmv5 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple"Copy" batch file bozo Windows Legacy Support (XP and earlier) 33 12-19-2004 08:12 AM
DOS - Use Xcopy or a batch file to copy all subdirectories lotrtrotk Windows Legacy Support (XP and earlier) 14 09-18-2004 10:46 AM
simple batch file justins Web Design / Development 7 08-30-2004 01:17 PM
Heres some Window Secrets Citron Windows Tips, Tricks, and Tweaks 22 01-12-2003 07:07 AM
Dos batch file output to log file manchauser Web Design / Development 1 10-31-2000 02:58 AM


All times are GMT -5. The time now is 09:21 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2