How can I paste multiple files with identical names in XP?
The situation is thus: I have a large number of jpg images in the
Temporary Internet Files folder, all of which are named 'webcam.jpg'.
I cannot easily work with them while they are in this folder, as it is
hidden from most applications. I therefore want copy the files to
another, normal directory. The problem is, windows explorer will not
paste all of them; I get the 'Do you want to replace the existing
file...with this one...?' dialogue box. If I take 'yes' , each file
replaces the one before and I lose all but one of them. If I take
'no', one of two things happens:
1. The next file is pasted, with a new name, eg webcam[2].jpg . This
happens about 20% of the time.
2. The file is not pasted at all; it is skipped over. This happens
about 80% of the time.
Then the box comes up again until all are accounted for. I am dealing
with ~100 files at a time, so renaming them all myself is out of the
question. How can I make sure that all the files are pasted in one go? |
Request for Question Clarification by
rainbow-ga
on
11 Jun 2004 10:26 PDT
Hi rexregum,
Would an explanation on how to rename multiple files with Windows
Explorer interest you? ( I don't mean doing them one by one.) The
files would then be named the same with a number in parentheses
appended to the name to make the new file name unique. Then you can
copy and paste as you normally would.
Regards,
Rainbow
|
Clarification of Question by
rexregum-ga
on
11 Jun 2004 23:51 PDT
Yes, that would be fine. I'm not really at home with DOS-based things,
so this sounds like the better approach to me. How do I rename multple
files at once with windows explorer, then?
|
Clarification of Question by
rexregum-ga
on
12 Jun 2004 03:12 PDT
N.B.: the images are currently in the Temporary Internet Files folder;
I don't think I can rename them while they're still there. Would your
proposed method still work?
|
Request for Question Clarification by
pafalafa-ga
on
14 Jun 2004 12:12 PDT
rexregum-ga,
I'm a bit reluctant to throw my 2 cents in the mix here, what with all
the advice you've gotten already, but...
Can't you just create a new, empty folder, and bulk copy the files
from the Temporary Internet Files folder into the new folder, using
windows explorer?
When I tried this with my XP system for files with identical names,
they copied just fine into the new folder, but with a number appended:
testfile[1] testfile[2] etc.
If I understand correctly, this is the output you want, yes...?
Good luck.
pafalafa-ga
|
Clarification of Question by
rexregum-ga
on
14 Jun 2004 13:09 PDT
The problem I have repeatedly encountered is that explorer, for some
reason, assigns the same numbers more than once, and ends up either
replacing about 80% of the files with the remaining 20% or not copying
them at all.
In short, I can't get all of the files in one go, especially when
dealing with large numbers of them [~100]...
|
Request for Question Clarification by
pafalafa-ga
on
14 Jun 2004 13:22 PDT
Hmmm...it worked for me, no problem. I don't see why you should get
the "Do you want to replace..." message, if you're copying the files
into an empty folder, where there's nothing to replace!
Are you doing the same thing I tried...highlighting all the same-named
files in the Temporary Internet folder, and then clicking on the whole
batch and dragging it into the new, empty folder?
If that doesn't work, I'm at a loss...sorry.
paf
|
Clarification of Question by
rexregum-ga
on
14 Jun 2004 22:36 PDT
I think what could be causing the problem is that the files have a
timestamp in the filename, after the file extension, which is about 12
digits long. Only the last digit changes between each file and the
next. Thanks for your assistance anyway...
|
Request for Question Clarification by
pafalafa-ga
on
16 Jun 2004 09:57 PDT
Allright. Now I'm just tossing out a brain dump, for whatever it is
or isn't worth...
What happens if you use the "Files or Folders" Find function (from the
start menu) to find all files named 'webcam*.jpg'????
Set the "View" to Detail, so you get the full file name, path, etc.
Seems to me, they should all appear in the Results box, and you can
then easily sort them by Folder (press the "In Folder" coumn header to
sort). They SHOULD be independently numbered in each folder, so you
can copy and paste to a new folder. You may need to house them in
more than one new folder, however, if the copy/paste operation doesn't
autmomatically rename any duplicates. Still, you should be able to
move them all into just a small number of discrete folders.
Kapish?
Let me know if this works, or if it blows up your computer....!
paf
|
Clarification of Question by
rexregum-ga
on
16 Jun 2004 22:55 PDT
With your inspiration I've gone one better. The trick of selecting
multple files and pressing f2 appears to work at the search results
screen; I rename one file, then all the rest are renamed without any
duplication. This works perfectly- I can even sort the files by date
last modified first, so that they're all named by time taken.
http://support.microsoft.com/?kbid=320167
I think that Rainbow was going to tell me about this, but I found it
myself quite easily, some time after he ceased posting here.
The annoying thing is that I thought of trying to use the temporary
internet files folder first; it's given me no end of grief. It made it
very hard to fathom what the problem was, and that's not helped you
much either :(
I really seem to have cracked this one now- thanks to your support. I
apologise for my incompetence with awk- it's good to know that it's
there if I need it, and I'll probably teach myself to use it at some
point.
I'm not sure who I should pay at this point; paf and rainbow are
eligible, but I seem to have beaten them to the final answer. crythias
has put in more work than either, though, but he isn't a researcher.
What's the policy in these situations? I'll split the money three ways
if that's acceptable to you...
|
Request for Question Clarification by
pafalafa-ga
on
17 Jun 2004 07:13 PDT
rexregum-ga,
I'm glad to hear you got this resolved...it was an unexpectedly sticky problem.
For all the good work contributed in the comments section, there is no
way to pay crythias-ga -- only actual GA researchers can receive
compensation here.
Since no one actually answered your question, you needn't pay anything
at all (or...you can pay yourself, since you sort of supplied the
final answer!).
But if you would like to, you can give me the go ahead to post a
formal answer. I will then contact rainbow-ga, and we'll work out a
fair compensation between us (researchers have done this sort of thing
before...it generally works out fine).
However it works out, though, this was the sort of question I like: a
challenge that I just *know* has a straightforward answer...the trick
is, figuring out what it is...!
All the best,
paf
|
Clarification of Question by
rexregum-ga
on
17 Jun 2004 08:19 PDT
Well, I have to admit that it wouldn't be the first time I've gone
away from here without paying a sou, so this isn't unprecedented.
Thank you once again, then and goodbye.
|
Request for Question Clarification by
rainbow-ga
on
17 Jun 2004 15:31 PDT
Hi rexregum,
You are correct. I was going to tell you about the site you later
found yourself. I ceased posting here when I realized the method I had
in mind would not work with Temporary Internet Files which you were
interested in.
Best of luck,
Rainbow
|
To crythias, Palalafa, Rainbow et al:
I think I now understand why I am getting this error. The temporary
internet files folder, it seems, is no more than a convenient way of
viewing- just viewing -all the downloaded files in one place. Thus
files cannot be renamed there. The files are actually kept in a hidden
system of folders, i.e. two levels in, inside the content.ie5 folder,
which I shall call subfolders. The files are split in no easily
discernable way between these subfolders.
Now when multiple files with identical names are saved in one of these
subfolders, the usual system of [number] at the end of the filename
comes into effect. None of these subfolders can see that the other
subfolders can also contain files with the same name, so in each
subfolder there could be a webcam.jpg, webcam[1].jpg, a webcam[2].jpg
and so on.
The confusion arises because the temporary internet files folder only
shows the original filenames, without [number] on the end. So when I
try to copy the files from the temporary internet files folder, I am
in fact copying several of webcam[1].jpg or webcam[2].jpg, each from
different folders. Windows presumably sees that the filenames have
already been appended and stops there, refusing to rename them again.
Files can be renamed in these subfolders.
Is there a script that could change part of the name of the files in
each of the subfolders differently? That way there wouldn't be any
duplication of file names between folders and I could copy them
normally, via the temporary internet files folder. e.g. for the first
folder: web1cam.jpg, for the next web2cam.jpg and so on. Then windows
could just add the number onto the end as normal, and wouldn't replace
files when copying.
crythias: The script is copying some of the files as it stands, but I
don't think it's copying them correctly; there has been no more than
one file turning up from each subfolder, and the files that have
appeared are mostly or entirely blank, though partially correct [i.e.,
right resolution/image size]. I think I would be more than happy with
a script that just renamed the files based on which subfolder they
were in and left them there. Thank you for your help. |
You wrote:
The -=-=-=- headers and footers seem to be different lengths for the
different versions posted; are they arbitrary?
-=-=-=-=--=-=-=--==
I use the -=-=-=- to separate chunks of data. Ideally (and I apologize
if this wasn't clear) you should merely select every line BETWEEEN the
-=-=-'s (That is, between the line that indicates BEGIN, and the line
that indicates END.) copy, and paste into the file mentioned at the
BEGIN tag.
the file parse.awk must be located at c:\ and ONLY look like:
BEGIN {i=0}
{ i++
dest=c:\\Documents and settings\\Angharad Miller\\Local Settings\\webcam\\\\
print("copy \042" $0 "\042 \042" dest "webcam" i ".jpg\042")
}
the uberbat.bat can be anywhere.
the awk95.exe can be anywhere in your path, but likely c:\windows is
as good a place as any.
As long as uberbat.bat uses awk95 as a filename, awk95 must exist.
If you included the -=-=-'s in the parse.awk, awk95 will balk :) hee
hee :) because awk95 doesn't understand what to do with the -=-=-'s.
Please understand, I've tested this so far and have been able to do
this with fairly positive success, so I don't want you to feel like
I'm using you as a test bunny. If any other commentors or Researchers
would like to try this and offer their results, I'd really appreciate
the feedback. I'd hate to continue with some flagrant error that I've
overlooked... Also, rexregum, you're getting an incredible deal (of
course, that will be your opinion) on this because I'm not a Google
Answers Researcher, so I can't receive payment for these comments and
revisions.
As far as I'm concerned, the best answer for Windows is to Find/Search
for Files in C:\Documents and Settings\Angharad Miller\Local
Settings\Temporary
Internet Folders\Content.IE5 that are named webcam*.jpg.
Sort by name.
Select all of the webcam.jpg
Copy to destination folder.
create a new destination folder for webcam[1]'s
select all of the webcam[1].jpg's in your search results.
paste all of the webcam[1]'s into the destination folder for webcam[1]
Repeat the last three steps for each webcam[#]
The reason is just so the automatic numbering of the multiple copy
doesn't interfere. That is to say, in the first webcam destination
folder, webcam.jpg will appear, then webcam[1].jpg will appear (it is
an automatic rename of webcam.jpg). We can't have all of the Internet
Files webcam[1]'s interfere with the webcam[1] that is created, so we
put the webcam[1]'s in their own directory.
At the point that you've pulled your hair out with my original
thoughts, processes, and schemes, why didn't I do this first? Because
um. well, the program *is* faster when it works. Your results may
vary. |