PDA

View Full Version : program that will copy a single file into 255 folders at once?


rive22
07-27-2005, 12:21 AM
Ok, I was wondering if anybody knows of a program that will copy a single file into multiple folders at once? I would guess there is such a thing, considering with computers and software there is something for everything. Plus considering there is such a thing as batch file renamers etc., so I would think this as well.

I'm looking to copy a single jpg into 255 folders. These folders are htm web based folders that store the image and data from web pages when you save them. I need to replace a picture tha has the same exact file name in every single folder.

Can anybody help please?

thanks :D


also, when i upgraded to sp2 and xp pro, i noticed that in thumbnail view, my saved htm web pages don't show as images anymore in the folder, but rather just the E for internet explorer. Before in thumbnail view, all the web page files use to show the image in the thumbnail. Anybody know how to fix this?

Ranma_Sao
07-27-2005, 12:23 AM
Easy to do in batch script. Are the folders named a certain way?

rive22
07-27-2005, 12:26 AM
yeah, all the folders are named started with Page 1, Page 2, Page 3, etc. All the way up to 255.

or even a command prompt code would be good too. :)

visaris
07-27-2005, 10:03 AM
In a bash shell (linux, or cygwin for windows):

for ((i=1; i<256; i++)) ; do cp file.whatever "Page $i" ; done

rive22
07-27-2005, 05:38 PM
eh you kinda lost me there.

rive22
07-27-2005, 10:54 PM
isnt there a code i can just use in regular command prompt?

help pleassee. i have to have this done by morning. i started doing them one at a time lmaoo but it takes forever.

spectrum
07-27-2005, 11:28 PM
this should work
for /L %i in (1,1,255) do copy drive:\full\path\to\pic.jpg drive:\full\path\to\page%i
I do however take NO responsibility if that deletes your files, formats your hard drive, or buggers up your system in some other way ;)

S

zappa86
07-28-2005, 12:15 AM
Wow I had no idea you could do for loops in the cmd prompt.

spectrum
07-28-2005, 12:31 AM
yep. do a for /? and it will give you about 4 pages of details on it.
for loop works in XP and 2K I think. Not sure about NT/9X though.