How do i flag files with same name but different extensions?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
-Lawz-
Junior Member
Junior Member
Posts: 3
Joined: 2003-12-16, 19:53 UTC
Location: Uk

How do i flag files with same name but different extensions?

Post by *-Lawz- »

Hi

I encode many many small video clips to mpeg from various other video formats, avi, mov etc, i have 2 folders, one contains the original files(VIN) and the other contains the encoded processed Mpegs(VOUT).

The problem i have is some of the original files, do not encode for various reasons, which doesn't matter here.

I need to know of the command or feature in TC that can mark the Dupe filenames REGARDLESS of the file-extension, which do not appear in both folders and/or DO appear in both folders.

This is so i can encode the failed files via an alternative method and delete the unwanted completed files in [VIN]. Each folder contains 100's of clips, manually comparing by sort methods is tedious at best.


I hope u understand what im trying to explain, if not please ask tell me to clarify more.

regards
Lawz
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Re: How do i flag files with same name but different extensi

Post by *Clo »

-Lawz- wrote:Hi

I encode many many small video clips to mpeg from various other video formats, avi, mov etc, i have 2 folders, one contains the original files(VIN) and the other contains the encoded processed Mpegs(VOUT).

The problem i have is some of the original files, do not encode for various reasons, which doesn't matter here.

I need to know of the command or feature in TC that can mark the Dupe filenames REGARDLESS of the file-extension, which do not appear in both folders and/or DO appear in both folders.

This is so i can encode the failed files via an alternative method and delete the unwanted completed files in [VIN]. Each folder contains 100's of clips, manually comparing by sort methods is tedious at best.

I hope u understand what im trying to explain, if not please ask tell me to clarify more.
regards
Lawz
:D Hello!
Whether I understood your request alright, you want for know what are the fake-coded files in the target-dir. ?
:oops: Although I'm not an expert at this, I think that you could try the "Compare by contents" function, using always the same right coded file as the template; then, you could compare it with suspicious files (the size could be a good criterion to find them....); comparing only the headers of these files might be enough, I think.
:cry: The snag is that TC can't compare automatically a group of ("bad") selected files with a template automatically, I think. You must do this one by one... then move the bad files to a Stand-by sub-dir. .
:arrow: An idea to submit to CH. Ghisler...
:arrow: To be continued...
Friendly regards
Claude
Clo
Last edited by Clo on 2003-12-17, 08:08 UTC, edited 1 time in total.
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Coco
Senior Member
Senior Member
Posts: 223
Joined: 2003-02-07, 13:35 UTC
Location: Belgium
Contact:

Post by *Coco »

You may be able to do it with jv16 powertools.
(http://www.macecraft.com)
Alain
Basiltoo
Junior Member
Junior Member
Posts: 10
Joined: 2003-11-28, 11:09 UTC
Location: Cornwall UK

Re: How do i flag files with same name but different extensi

Post by *Basiltoo »

-Lawz- wrote:I need to know of the command or feature in TC that can mark the Dupe filenames REGARDLESS of the file-extension, which do not appear in both folders and/or DO appear in both folders.
Use Compare Directories. You are able to use wildcards in the file filter box e.g. clip.* etc.
Regards,
Baz
User avatar
Coco
Senior Member
Senior Member
Posts: 223
Joined: 2003-02-07, 13:35 UTC
Location: Belgium
Contact:

Post by *Coco »

Hi Basiltoo,

I don't see what you mean.
If you use the compare directories it will not mention two same files if they have different name.
Alain
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Post by *chasbas »

I too am not sure what you are asking for, but I have asked for something along the lines of A+GrayPlus. This selects all files with the same extension. I want to select all files with the same name and different extensions. I need this all the time, but not too many other people seem to care about it.

Maybe I do see what you want... I have 1000 C routines that I compile into a subdirectory. How do I find out whether any of those compiles failed? I have to see if there exists a filename.obj in one dir corresponding to each filename.c in another. My solution to this was to write a Perl program. Don't know if that helps...
Basiltoo
Junior Member
Junior Member
Posts: 10
Joined: 2003-11-28, 11:09 UTC
Location: Cornwall UK

Post by *Basiltoo »

Coco wrote: I don't see what you mean.
If you use the compare directories it will not mention two same files if they have different name.
Absolutely right Alain. It was a case of letting out the clutch before the brain was in gear ;)
Regards,
Baz
-Lawz-
Junior Member
Junior Member
Posts: 3
Joined: 2003-12-16, 19:53 UTC
Location: Uk

Post by *-Lawz- »

Maybe I do see what you want... I have 1000 C routines that I compile into a subdirectory. How do I find out whether any of those compiles failed? I have to see if there exists a filename.obj in one dir corresponding to each filename.c in another. My solution to this was to write a Perl program. Don't know if that helps...[/quote]

Hi

Yes chasbas

Exactly the same scenario,your compiled code in one dir and the source in another, same filename but different extension.

Hmm, sounds like a non current TC feature (Christisan!!), a work around ive incorporated now, once processed, is to rename all the files in the original folder to mpg, then compare to processed folder, invert the selection then delete them, whats left i rename back to avi or whatver and reprocess in another app. Quicker than manual checking/deleting i guess.

Thanks everyone, for spending the time to try help.

-Lawz-
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2-Lawz-

I hope I understood your request:

Here is a workaround (not a solution)

Given: Folder VIN with *.avi files and a VOUT folder with *.mpeg files.

1. Rename all files in VOUT to *.avi using the Multi rename tool.
2. Now use Synchronize directories. Uncheck "ignore date" and "by content". Now play with the "singles"- and "duplicates"-buttons to get the requested informations.
3. Now open the Multi rename tool again and simply press undo.
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Post by *chasbas »

I don't know if you use Perl or not, but here is a small program that compares two directories for files without all that copying and renaming:

Code: Select all

# take parameters from command line - if not there, assign a default

$extension1 = "c";
$dir1 = $ARGV[0] || "*.$extension1";

$extension2 = "obj";
$dir2 = $ARGV[1] || "obj\\*.$extension2";

@master_files = map { /(.*\\)?(.*)\./; $2 } glob $dir1;
@dependent_files = map { /(.*\\)?(.*)\./; $2 } glob $dir2;

@master_files{@master_files} = 1;
@extra_dependent_files{@dependent_files} = 1;
delete @master_files{@dependent_files};
delete @extra_dependent_files{@master_files};

print "Extra Master Files: " . (join ",", keys %master_files) . "\n";
print "Extra Dependent Files: " . (join ",", keys %extra_dependent_files) . "\n";
You can change the defaults it uses (including the directories), and the way it outputs the results (right now just a comma separated list of file names). It shows the files with the chosen extension that are in one directory but don't exist with the other extension in the other directory, and vice-versa.

Hope this helps.
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2chasbas
without all that copying and renaming
Copying?
chasbas
Junior Member
Junior Member
Posts: 52
Joined: 2003-02-06, 16:01 UTC
Location: New Jersey

Post by *chasbas »

Lefteous wrote:2chasbas
without all that copying and renaming
Copying?
I prefer to have a backup if I'm going to rename large numbers of files and rely on "undo" to rename them back. What if I accidently close TC or do another Multi-Rename before undo-ing?
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2chasbas
I prefer to have a backup if I'm going to rename large numbers of files and rely on "undo" to rename them back. What if I accidently close TC or do another Multi-Rename before undo-ing?
Simply perform another multi rename action with swapped entries for search & replace for example, if undo is no longer available.
Post Reply