Comando Touch in uno script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Panciop
    Visitor
    • Jan 2009
    • 8

    Comando Touch in uno script

    Ciao a tutti, ho bisogno di eseguire un TOUCH per allineare le date di una cartella in uno script, ma sembra non funzionare, la cartella in explorer continua ad avere una data diversa. Se eseguo il comando da BC direttamente tutto funziona.

    Ecco il mio script, le istruzioni sono le ultime 2 righe:
    load "D:\foo\faccia_" "D:\foo\faccia"
    expand all
    select lt.newer.files
    compare binary
    touch lt->rt
    select lt.diff.files
    copy lt->rt
    select rt
    touch lt->rt


    Potete darmi una soluzione ?
    Esiste la possibilità di creare una sorta di Macro con una lista di comandi da lanciare, potrebbe essere un'altra soluzione.

    Grazie 1000
  • Aaron
    Team Scooter
    • Oct 2007
    • 15995

    #2
    Hello,

    Do you have administrator rights, and does your User which runs the script have Administrator Rights?

    expand all
    ...
    select rt
    touch lt->rt
    should touch all folders and files on the right with timestamps from the left, regardless of your other script commands.

    Your script seems a bit complicated. Do you take each and every one of these actions in this order when you use the program interactively?

    http://www.google.com/language_tools?hl=en
    Ciao,

    Avete diritti di amministratore, e il vostro utente che esegue lo script sono i diritti di amministratore?

    expand all
    ...
    select rt
    touch lt->rt
    dovrebbe toccare tutte le cartelle ei file a destra con timestamp da sinistra, indipendentemente dalla vostra altri comandi di script.

    Lo script sembra un po 'complicato. Ti prendono tutti e ciascuno di tali azioni in questo ordine quando si utilizza il programma interattivo?
    Aaron P Scooter Software

    Comment

    • Panciop
      Visitor
      • Jan 2009
      • 8

      #3
      Hi thx for the answer,
      I have all administrator rights.

      If I use a script with just these command

      select rt
      touch lt->rt

      it doesn't work as well

      We have to run script as we have a pc on the net (VPN) and other pc are not in the same net, so the script it's necessary to align "off-line" pc with the on-line one
      TimeStamp is necessary as we use CVS

      -------------------
      Grazie per la risposta, ho tutti i diritti da amministratore

      Anche se uso uno script con solo questi comandi
      select rt
      touch lt->rt
      non funziona

      Dobbiamo lanciare lo script perchè abbiamo un pc in rete (via VPN) ed altri pc non sulla stessa rete, lo script è necessario per allineare i pc "off-line" con quello sulla rete.

      Il TimeStamp è fondamentale perchè usiamo CVS

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15995

        #4
        Could you send your exact script files to [email protected] ?

        The whole script would need
        load folder1 folder2
        expand all
        select rt
        touch lt->rt

        try testing the script on two local folders (c:\temp\test1 c:\temp\test2)
        inside each test1/test2 have multiple folders and files.
        See if that works. You can manually set the folder's timestamps with the graphical interface, right-click on the folders, and Touch. This will make it easier to then see if the script is working if Test1/folder/file.txt is set to 1/1/2007 and Test2/folder/file.txt is set to 12/1/2008. Or something else like that that is easy to see.

        http://translate.google.com/translate_t#
        Potete inviare le vostre file di script per [email protected]?

        L'intero script avrebbe bisogno di
        carico cartella1 Cartella2
        espandere tutte le
        selezionare rt
        lt touch-> rt

        provare lo script di test su due cartelle locali (c: \ temp \ test1 c: \ temp \ test2)
        all'interno di ogni test1/test2 hanno più cartelle e file.
        Vedere se funziona. È possibile impostare manualmente la cartella del timestamp con l'interfaccia grafica, fate clic destro sulla cartella, e Touch. In questo modo sarà più facile per poi vedere se lo script sta lavorando Test1/folder/file.txt se è impostato su 1/1/2007 e Test2/folder/file.txt è impostato su 12/1/2008. Oppure qualcosa di diverso come quello che è facile da vedere.
        Aaron P Scooter Software

        Comment

        • Panciop
          Visitor
          • Jan 2009
          • 8

          #5
          Grazie per il tempo che mi dedicate, ecco il mio script

          load "P:\1" "P:\2"
          expand all
          select rt
          touch lt->rt


          Vi mando un video a support che vi fa vedere la mia prova:
          - la data dei files contenuti nella cartella vengono cambiati
          - (BUG) la data della cartella NON viene cambiata

          Io ho la necessità di aggiornare la data della cartella.

          Grazie

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 15995

            #6
            Hello,

            I sent an email and picture back. The issue is that touch does not touch the Base Folders, only the Base Folder's contents. This is the same as the graphical approach, where you cannot actually select the base folders.

            You would want:
            P:\1\folder and P:\2\folder and load P:\1 P:\2 for folders to see it touch the folders and files.

            Let us know if you have any other questions.

            ==================

            Ciao,

            Ho inviato una e-mail e l'immagine indietro. Il problema è che non tocco toccare la base delle cartelle, solo la base del contenuto della cartella. Questa è la stessa della grafica, in cui non è possibile selezionare la realtà di base cartelle.

            Si consiglia:
            P: \ 1 \ cartella e P: \ 2 \ cartella e caricare P: \ 1 P: \ 2 per le cartelle per vedere e toccare le cartelle di file.
            Aaron P Scooter Software

            Comment

            • Panciop
              Visitor
              • Jan 2009
              • 8

              #7
              Ciao,
              scusa ma no riesco a capire:
              utilizzando l'interfaccia utente è possibile cambiare il TimeStamp di un folder copiandolo da un altro (vedi filmato allegato) e i TimeStamp dei files contenuti nella cartella NON vengono cambiati.

              Io vorrei fare la stessa cosa ma utilizzando uno script, o comunque qualcosa di automatizzato (ex Macro).

              Se è possibile farlo con uno script, potreste cortesemente inviarmelo in modo da provarlo?

              Grazie per il grande supporto, ciao

              Comment

              • Aaron
                Team Scooter
                • Oct 2007
                • 15995

                #8
                Hello,

                The Graphical Interface and Script are doing identical behavior. Your script loads P:\1 and P:\2. This screenshot loads e:\temp\A and e:\temp\B.

                I can select things inside of e:\temp\a\Excel or e:\temp\a\MP3. I cannot select e:\temp\a.
                Script works the same way.

                Does that help explain what you are seeing?

                ========
                Ciao,

                L'interfaccia grafica e script stanno facendo identico comportamento. Il tuo script carichi P:\1 e P:\2. Questo screenshot mostra carichi e:\temp\A ed E:\temp\B.

                Sono in grado di selezionare le cose all'interno di e:\temp\a\Excel o E:\temp\a\MP3. Non è possibile selezionare e:\temp\a.
                Script funziona allo stesso modo.

                Il che spiega quello che stai vedendo?
                Aaron P Scooter Software

                Comment

                • Panciop
                  Visitor
                  • Jan 2009
                  • 8

                  #9
                  Hi Aaron, have you seen my video ?
                  I sent you a new one with folder touch management using graphic interface to support e-mail

                  Here attached you can find some pictures regarding steps I've done.
                  Notice that only folder TimeStamp is changed and not folder's content one.


                  Ciao Aaron hai visto il mio video?
                  Ne ho spedito uno nuovo con la gestione del touch tra cartelle tramite interfaccia grafica alla e-mail dell'assistenza.

                  Qui puoi trovare alcune immagini con i passi che ho seguito.
                  Da notare come venga cambiata solo la data della cartella e non del qualla del suo contenuto
                  Last edited by Panciop; 27-Jan-2009, 01:36 AM.

                  Comment

                  • Michael Bulgrien
                    Carpal Tunnel
                    • Oct 2007
                    • 1772

                    #10
                    Scooter - When touching folders and including folder contents, it would be helpful if there were an option to take the folder's current datetime stamp and cascade it down through all subfolders and files.

                    Action:
                    ■ Including folder contents
                    ○ Copy timestamps from other side
                    ● Set timestamps to -->

                    Default:
                    ● Current folder timestamp
                    ○ Current system time
                    ○ Last touch
                    Last edited by Michael Bulgrien; 27-Jan-2009, 10:07 PM.
                    BC v4.0.7 build 19761
                    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                    Comment

                    • miki
                      Moderator
                      • Nov 2007
                      • 16

                      #11
                      Not easy to "debug" the Panciop's problem, because it's a particular situation.
                      He need to copy the right folder timestamp to right (but NOT the files timestamp) and it's possible on the Graphical Interface because the folder compared are sub folders and not base folders (step1.JPG, step2.JPG, ...)
                      But with the script, the folders 1 and 2 are loaded as base folders: load "P:\1" "P:\2"
                      and in this case they couldn't be touched.
                      He should load the parent folder ... like load "P:\" "P:\" but in this case all subfolders will be loaded
                      I think could be a Script limit, because on some particular condition it's not possible to scripts all operation that we could do manually on the Graphical Interface.
                      The solutions should an advanced "TOUCH" where could be possible to select if the touch will be only for files, only for folders or for files and folders

                      This is my opinion, I hope this will help you.

                      Regards

                      Miki


                      Non è facile "debuggare" il problema di Panciop, perchè è una situazione particolare.
                      Ha bisogno di copiare la data dalla cartella di destra (ma NON le date dei file) ed è possibile da interfaccia grafica perchè le cartelle comparate sono sottocartelle e non cartelle base (step1.JPG, step2.JPG, ...)
                      Ma con lo script, le cartelle 1 e 2 sono caricate come cartelle base: load "P:\1" "P:\2"
                      e in questo caso non possono essere toccate.
                      Dovrebbe caricare la cartella superiore ... tipo load "P:\" "P:\" ma in questo caseo tutte le sottocartelle sarebbero caricate
                      Penso possa essere un limite dello script, perchè in alcune condizioni particolare non è possibile scriptare tutte le operazione che potremmo fare manualmente da interfaccia grafica.
                      La soluzione potrebbe essere un "TOUCH" avanzato dove possa essere possibile selezionare il touch solo per i file, solo per le cartelle o per file e cartelle.

                      E' la mia opinione, spero possa esservi di aiuto.

                      Saluti

                      Miki
                      Beyond Compare® BC2 v2.5.3 build 253
                      Beyond Compare® BC3 v3.0.13 build 9597
                      http://michele.beriola.it/

                      Comment

                      • Michael Bulgrien
                        Carpal Tunnel
                        • Oct 2007
                        • 1772

                        #12
                        Even though a script cannot do eveything that you can do in a session, you can prepare a session to load into a script. Using Panciop's original script, this is what can be done:
                        • Open a folder session with D:\ as the root folder on both sides
                        • Set the file filters to: -.\*.*;foo\faccia_\;foo\faccia\
                        • Expand the foo folder on both sides
                        • Align faccia_ on the left with faccia on the right
                        • Choose "Save Session As..." from the session dropdown menu
                        • Choose a meaningful name for the session such as: "faccia_ faccia"


                        Anche se uno script non può fare eveything che si possono fare in una sessione, è possibile preparare una sessione di caricare in uno script. Uso Panciop's script originale, questo è ciò che si può fare:
                        • Aprire una cartella di sessione con D:\ come cartella principale su entrambi i lati
                        • Impostare il file di filtri per: -.\*.*;foo\faccia_\;foo\faccia\
                        • Espandere il "foo" cartella su entrambi i lati
                        • Allineare "faccia_" sulla sinistra con la "faccia" sulla destra
                        • Scegli "Save session as..." dal "Session" menu a discesa
                        • Scegli un nome significativo per la sessione, come: "faccia_ faccia"


                        In the script, touch can now be used only for the folder:

                        Nello script, touch ora può essere utilizzato per la cartella solo:

                        Code:
                        load "faccia_ faccia"
                        expand foo
                        select folders
                        touch lt->rt
                        Last edited by Michael Bulgrien; 27-Jan-2009, 10:21 PM.
                        BC v4.0.7 build 19761
                        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                        Comment

                        • Panciop
                          Visitor
                          • Jan 2009
                          • 8

                          #13
                          Hi,
                          I'm checking....... ;-))))

                          My aim is to have a script that makes the same thing done by hand using interface as shown in pictures

                          If I cannot use a script... there is a way to have a Macro or "Custom-Command" that is a list of standart command ?
                          In this case I can use interface by pressing just a command instead of many click.


                          Ciao to everybody

                          ----------------------------------
                          Ciao,
                          sto provando ;-)))))))).

                          Il mio obiettivo è quello di avere uno script che faccia le stesse cose fatte da me a mano utilizzando l'interfaccia utente.

                          Se non posso utilizzare uno script ....c'è un modo per avere una Macro o un "Comando personalizzato" che è una lista di comandi standart?
                          In questo caso potrei usare l'interfaccia utente premendo un solo tasto anzichè una serie di tasti

                          Ciao a tutti
                          Last edited by Panciop; 28-Jan-2009, 01:47 AM.

                          Comment

                          • Michael Bulgrien
                            Carpal Tunnel
                            • Oct 2007
                            • 1772

                            #14
                            Originally posted by Panciop
                            Il mio obiettivo è quello di avere uno script che faccia le stesse cose fatte da me a mano utilizzando l'interfaccia utente.
                            Since you are aligning two folders that have different names in the user interface, and since there is no "align" command in the scripting syntax, the only way to accomplish what you want is to start by creating the alignment in the user interface first, save the session, then load the session with your script as I described in my last post. Please try that method to see if you can get a solution that will work for you.

                            Dato che si sta allineando due cartelle che hanno nomi diversi in l'interfaccia utente, e poiché non vi è alcuna "align" comando nella sintassi di scripting, l'unico modo per compiere ciò che si desidera è di iniziare a creare l'allineamento l'interfaccia utente in primo luogo, salvare la sessione, quindi caricare la sessione con il tuo script come ho descritto nel mio ultimo post. Si prega di provare questo metodo per vedere se è possibile ottenere una soluzione che funziona per voi.
                            BC v4.0.7 build 19761
                            ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                            Comment

                            • Michael Bulgrien
                              Carpal Tunnel
                              • Oct 2007
                              • 1772

                              #15
                              Originally posted by miki
                              Dovrebbe caricare la cartella superiore ... tipo load "P:\" "P:\" ma in questo caseo tutte le sottocartelle sarebbero caricate
                              In yesterday's post I used a filter to prevent all subfolders from being loaded when the parent folder is set as the base folder.

                              Nel post di ieri ho usato un filtro per prevenire tutte le sottocartelle da essere caricato quando la cartella è impostata come cartella di base.

                              -.\*.* = Ignore all files in the base folder / Ignorare tutti i file nella cartella di base

                              foo\Faccia_\;foo\Faccia\ = Only load aligned Subfolders / Solo carico allineato sottocartelle
                              BC v4.0.7 build 19761
                              ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

                              Comment

                              Working...