Terrible! a script has renamed all my movies files ! :(

If you need help on how to use the program
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Terrible! a script has renamed all my movies files ! :(

Post by otreux »

stavo provando alcuni script per vedere cosa fanno e, non so quale e cosa ho fatto, ma ora tutti i miei film sono rinominati in questo formato:

[1159] Harry a pezzi [Deconstructing Harry] 1997

o

[1479] Un corpo da reato [One night at McCool's] 2001 Italian English STItalian STEnglish

qualcuno sa come rinominarli nel classico formato:

anno - titolo tradotto



I was trying some scripts to see what they do and, I do not know what and what I did, but now all my films are renamed in this format:

[1159] Harry a pezzi [Deconstructing Harry] 1997

o

[1479] Un corpo da reato [One night at McCool's] 2001 Italian English STItalian STEnglish


someone knows how to rename them in the classic format:

year - translated title
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

if can help, in the filepath I have the correct name, so I need a script the export the filename form archive to video files and rename all

se puo aiutare, nell'archivio, nel campo Ubicazione File ho il nome corretto del file, mi servirebbe uno script che esporta il nome del file presente nel campo Ubicazione file e rinomina tutti i film che ho.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Terrible! a script has renamed all my movies files ! :(

Post by antp »

I don't understand everything.
Can you give more details and maybe some examples & screenshots?
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

sorry, is the panic :)

I have using the script RenameFiles.ifs
download from here
http://mickaelvanneufville.online.fr/AMCU/scripts/

I have use it for error and now all my movie collection is renamed :(

for example, first the name is

1995 - I ponti di Madison County

now is

[1512] I ponti di Madison County [The Bridges of Madison County] 1995 Italian English STItalian STEnglish

What I must do for undo this script effect?

Thanks
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Terrible! a script has renamed all my movies files ! :(

Post by antp »

And you do tests on your whole catalog with something you don't know? :shocked:

There should be a way to modify that script or write one to revert back the changes, but it takes some work to first understand what happened and then write the code.
I don't really have time this week for all the few other things to do in AMC (fixes in IMDb script, solving OFDb problem, etc.) so I can't really help you either right now. Maybe this weekend I could take some time to check how that script works, but no guarantee.
Or maybe someone else has some spare time...
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

sono stato uno stupido, ho sottavalutato l'impatto dello script e pensavo che, cambiando impostazioni, si potesse tornare indietro.
Attendo tue novità, o da parte di chi sarà, così gentile, da aiutarmi.
Grazie ancora

I was stupid, I overrated the impact of the script and I thought that, changing settings, we could go back.
I await your news, or from who will be, so kind, to help me.
Thanks again
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

prima di tutto: il file .back (salvataggio ante ultima modifica) contiene i campi corretti? Se si, basta rinominarlo. Altrimenti
Riassumo:
attualmente (post errore) tu hai:
titolo tradotto:
[1159] Harry a pezzi [Deconstructing Harry] 1997
[1479] Un corpo da reato [One night at McCool's] 2001 Italian English STItalian STEnglish
filepath:
Harry a pezzi [Deconstructing Harry] 1997 ____________________<------- esattamente questo!
[1479] Un corpo da reato ____________________<------- esattamente questo!
campo anno (rispettivamente):
1997
2001


il titolo tradotto deve diventare:
1997 Harry a pezzi
2001 Un corpo da reato
il filepath deve rimanere invariato
it titolo originale deve rimanere invariato
il campo anno deve rimanere invariato.


ho capito bene? Se ho capito male, indicami il contenuto esatto dei campi oppure esporta il d.b. in formato .csv (solo i campi importanti) e mandamelo privatamente (sono pochi KByte).
vedo di darti un aiuto e stai sereno, oggi è Festa!
;)

first of all: does the .back file (save before last modification) contain the correct fields? If yes, just rename it. Otherwise I summarize:
currently (post error) you have:
translated title:
[1159] Harry a pezzi [Deconstructing Harry] 1997
[1479] Un corpo da reato [One night at McCool's] 2001 Italian English STItalian STEnglish
filepath:
1997 Harry a pezzi ____________________
2001 Un corpo da reato ____________________
fieldyear (respectively):
1997
2001


Translated title must become:
1997 Harry a pezzi
2001 Un corpo da reato
Filepath must remain unchanged
Original title must remain unchanged
Fileyear must remain unchanged.

did I get it right? If I misunderstood, please indicate the exact content of the fields or export the d.b. in .csv format (only important fields) and send it to me privately (few KBytes).
I see that I can help you and you're calm, today it's Liberation Day!
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

L'archivio di Ant Movie Catalog ha tutti i nomi giusti, nel filepath ho, ad esempio

H:\Allen Woody\1976 - Il prestanome.mkv

Quelli che sono cambiati sono i nomi dei FILES, sto maledetto script mi ha cambiato il nome a tutti i film che ho.

l'mkv che prima si chiamava "1976 - Il prestanome.mkv"

adesso si chiama

"[1164] Il prestanome [The Front] 1976 Italian English STItalian STEnglish.mkv"

GRAZIE!

The Ant Movie Catalog archive has all the right names, in the filepath I have, for example,

H: \ Allen Woody \ 1976 - Il prestanome.mkv

Those that have changed are the names of FILES, this damn script has changed the name to all the movies I have.

the mkv that was previously called "1976 - Il prestanome.mkv"

now it's called

"[1164] The nominee [The Front] 1976 Italian English STItalian STEnglish.mkv"
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

... quindi l'opposto di quel che avevo capito io... :ha: :hum:
Hai rinominato i files nella cartella prendendone il file_name dal campo filepath del D.B.....
:wow: :wow: :wow:
beh, dai, un po' di pazienza e rimedieremo (spero) ....
:innocent:

... so the opposite of what I understood ... :ha: :hum: You renamed the files in the folder by taking the file_name from the filepath field of the D.B.....
well, come on, a little patience and we will remedy (I hope) ....
:innocent:
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

lo script mi ha rinominato tutti i video nelle cartelle.

Speriamo di risolvere perché non proprio voglia di rinominare 3000 file a mano :shaking:

Credo che, l'unico modo, sia modificare lo script RenameFiles.ifs e dirgli di, collegandosi al database dove nel filepath c'è ancora il nome corretto, di rinominare tutti i film con "anno - titolo tradotto"

the script renamed me all the videos in the folders.

We hope to solve because we do not really want to rename 3000 files by hand: shaking:

I think that the only way is to modify the RenameFiles.ifs script and tell it to connect to the database where in the filepath there is still the correct name, to rename all the films with "year - translated title"
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

otreux wrote: 2018-04-25 12:54:03 ...Speriamo di risolvere perché non proprio voglia di rinominare 3000 file a mano :shaking:
Sii paziente.
Quello script è molto delicato da trattare!
Io ne ho fatto uno che fa l'opposto di quel che ti serve ma dovrebbe essere abbastanza semplice da modificare e, soprattutto, esso crea un file .bat che puoi visionare prima di procedere all'operazione di rinomina!
a presto!
;)
Be patient.
That script is very delicate to treat!
I have done one that does the opposite of what you need but it should be simple enough to change and, better, how to create a .bat file that you can view before proceeding with the renaming operation!
See you soon!
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

Fulvio, fai con tutta la calma che vuoi, già è tantissimo che mi risolvi la sciocchezza che ho fatto :p

Fulvio, do it with all the calm you want, already it is so much that you resolve the nonsense I have done :p
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

fulvio53s03 wrote: 2018-04-25 16:34:13 .... Sii paziente.
Quello script è molto delicato da trattare!....
Ecco lo script di correzione che ti propongo:

Code: Select all

(***************************************************

Ant Movie Catalog importation script
www.antp.be/software/moviecatalog/

[Infos]
Authors=Fulvio53s03
Title=rename file from catalog
Description=rename File
Site=
Language=IT
Version=1.0
Requires=4.2
Comments=this Script will Rename your movies' file names with informations contained in field File Path (substituting file Name contained in translated title). Obviousely...... be careful!!!
License=GPL
GetInfo=0
RequiresMovies=0

[Options]

[Parameters]

***************************************************)

program RenameFilm;
uses
  StringUtils1;
var
  MovList: TStringList;
  DupList: TStringList;
  ResultPath, titlenew: string;
  New_filename, old_filename: string;
  Giri, giri_fatti, lgth_path: integer;

procedure Elaborazione;
begin
	new_filename := getField(fieldFilePath);
	old_filename := getField(fieldTranslatedTitle);
  Titlenew := 'ren "' + old_filename + '"     ' + new_filename + '"';
  DupList.Add(Titlenew);        //scrivi riga
end;
//
//MAIN PROGRAM
//
begin
  if StringUtils1_Version < 3 then
  begin
    ShowMessage('File "stringutils1.pas" is too old, please download a new version of it');
    Error;
  end;
  if ResultPath = '' then
    begin
    ResultPath := 'C:\prova\rename.bat.txt';
    Input('Update/Aggiorna Films', 'Store results to: / Salva Risultati in: ', ResultPath);
    giri := Getiteration;
    if MovList = nil then
       MovList := TStringList.Create;
    if DupList = nil then
       begin
       DupList := TStringList.Create;
       end
    end;
    Elaborazione;

  giri_fatti := GetIterationCount;
  if giri_fatti = Giri-1 then            //fine elaborazione
       begin
       Titlenew := 'pause';
       DupList.Add(Titlenew);            //scrivi riga
       DupList.SaveToFile(ResultPath);   //chiudi file
       end
end.
Esso produce C:\prova\rename.bat.txt.
1) Apri con blocco note C:\prova\rename.bat.txt e verifica se il suo contenuto è corretto:
es:
ren "ombre dal passato.mkv" "Bushwick (Cary Murnion, Jonathan Milott) 2017ombre dal passato.mkv"
significa: rinomina il file "ombre dal passato.mkv" in "Bushwick (Cary Murnion, Jonathan Milott) 2017ombre dal passato.mkv"

2) rinomina C:\prova\rename.bat.txt in C:\prova\rename.bat
3) copia il file nella cartella (o nel disco) contenente i files da rinominare

4) esegui il file .bat.

Naturalmente.... prova con un po' di film alla volta (comincia con 1!) e, se non sono stato chiaro :??: ..... chiedimi! ;)
Last edited by fulvio53s03 on 2018-04-27 10:52:03, edited 2 times in total.
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

Non capisco. Lo script non mi da l'opzione per agire su tutti i file o solo su quelli selezionati. E poi non mi crea il file .bat. Ho cercato in tutto il C: ma non c'è. Ho anche creato la cartella prova ma non viene creato

I do not understand. The script does not give me the option to add all files or only those selected. And then I do not create the .bat file. I looked all over the C: but it's not there. I have also created the test folder but it is not created
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

otreux wrote: 2018-04-26 22:05:05 Non capisco. Lo script non mi da l'opzione per agire su tutti i file o solo su quelli selezionati. E poi non mi crea il file .bat. Ho cercato in tutto il C: ma non c'è. Ho anche creato la cartella prova ma non viene creato

I do not understand. The script does not give me the option to add all files or only those selected. And then I do not create the .bat file. I looked all over the C: but it's not there. I have also created the test folder but it is not created
Il tuo windows non consente al programma di creare files sul disco di sistema.
Lo script chiede dove creare il file .bat: scegli una posizione alternativa (es. D:\rename.bat.txt).
Non avevi l'opzione: ho corretto lo script che avevo proposto.
Riprendilo e riprova.

Your windows does not allow the program to create files on the system disk.
The script asks where to create the .bat file: choose an alternative location (eg D:\rename.bat.txt).
You did not have the option: I corrected the script I had proposed.
Take it back and try again.
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

non mi crea il file. Ho cambiato percorso ma non va. Ho eseguito AMC come amministratore e disabilitato Win Defender ma il file non viene creato.
ho cambiato anche il nome in rename.bat o rename.txt ma senza risultati

it does not create the file. I changed route but it does not go. I ran AMC as an administrator and disabled Win Defender but the file is not created
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Terrible! a script has renamed all my movies files ! :(

Post by antp »

What path did you set?
The folder must exist

Did it run for at least one movie? (i.e. for the choice on the right "movies to include", was at least one movie found)

@fulvio53s03 > why not renaming directly the files like the other script did?
otreux
Posts: 194
Joined: 2008-10-22 16:55:46

Re: Terrible! a script has renamed all my movies files ! :(

Post by otreux »

il percorso è C: o D:
Si, ho selezionato alcuni file e poi lanciato lo script. Ho provato anche spuntando "seleziona tutti" ma non crea il file.bat. Eppure non uso nessun antivirus, solo Win Defender ed è disabilitato

the path is C: o D:
Yes, I selected some files and then launched the script. I also tried checking "select all" but does not create the file.bat. Yet I do not use any antivirus, only Win Defender and it is disabled

I use the last AMC v4.2.2 beta
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

antp wrote: 2018-04-27 07:25:03 @fulvio53s03 > why not renaming directly the files like the other script did?
I never used that script! :ha:
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Terrible! a script has renamed all my movies files ! :(

Post by fulvio53s03 »

otreux wrote: 2018-04-27 09:30:52 il percorso è C: o D:
Si, ho selezionato alcuni file e poi lanciato lo script. Ho provato anche spuntando "seleziona tutti" ma non crea il file.bat. Eppure non uso nessun antivirus, solo Win Defender ed è disabilitato
Ok... capito il problema (credo).
Non è possibile consentire la scelta sui film da rinominare!
o tutto o niente!
poi, in sede di analisi del file .bat, si prenderanno solo quelli desiderati.
L'alternativa sarebbe usare un campo di verifica....
ho rimodificato lo script in questo senso.
Riscaricalo.
:)
Post Reply