Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] rename document

Expand Messages
  • Manuel
    (Cita de Jody) ... Its work ok and it s more easy that my clip :-( Append the codedate to the file c: Jody.txt -- c: Joyd-010205.txt I like the idea becasue
    Message 1 of 10 , Feb 5, 2001
    • 0 Attachment
      (Cita de Jody)
      >Don't you think or can't you get something like this to work with
      >the rest of the code?

      Its work ok and it's more easy that my clip :-(

      Append the codedate to the file
      c:\Jody.txt --> c:\Joyd-010205.txt

      I like the idea becasue we are put a code such as -OLD or -ABC -B
      to mark severaly files at the end of the name, then we can find files
      *-ABC* , etc.

      rename with append codedate
      ^!Set %Name%=^$GetName(^$GetDocName$)$
      ^!Set %Current%=^##
      ^!Close ^%Current%
      ^!RenameFile "^%Current%" "^%Name%-^$GetDate(yymmdd)$.^%ExtType%"
      ; ^!Delay 1 if needed
      ^!Open "^%Name%^$GetDate(yymmdd)$.^%ExtType%"
      ---
      Manuel
      manuel123@...
      - Cursos por email:Windows,Navegador,Outlook,Html,Word,Excel,Access
      TambiƩn para ciegos.
      http://manuel123.8m.com
    • Harvey R. Savage
      ... Hi Elizabeth, If you haven t solved the codedate task yet here is my attempt. hrs Long lines separated by blank lines so you can unwrap if necessary. You
      Message 2 of 10 , Feb 7, 2001
      • 0 Attachment
        Elizabeth Wild wrote:
        >
        > Jody,
        >
        > I was reasonably sure that the problem was that I was trying to Rename without closing the file. > However, my brain was to tired to explore that possibility. I also did
        > the with the Save AS, because if I (personally) would use dates in file names when I wanted to be > able to track/save changes. I would then just need to eliminate
        > the Destroy line.
        >
        > Elizabeth


        Hi Elizabeth,

        If you haven't solved the codedate task yet here is my attempt.

        hrs

        Long lines separated by blank lines so you can unwrap if
        necessary.

        You can delete the commented lines if you want, it's a much
        shorter clip that way.

        If it dowsn't work first time try changing the delay up and down.

        H="Date/Time to Filename"
        ;-either ^!Set pair works!
        ;-this operates on the focused doc.
        ;---
        ^!Set %old%="^$GetPath(^##)$^$GetName(^##)$^$GetExt(^##)$"

        ^!Set
        %new%="^$GetPath(^##)$^$GetName(^##)$_^$GetDate(mmddyy_hhnnss)$^$GetExt(^##)$"
        ;---
        ;^!Set %old%="^$GetDocumentPath$^$GetName(^##)$^$GetExt(^##)$"

        ;^!Set
        %new%="^$GetDocumentPath$^$GetName(^##)$_^$GetDate(mmddyy_hhnnss)$^$GetExt(^##)$"
        ;---
        ^!RenameFile "^%old%" "^%new%"
        ;---
        ;-Depending on computer and disk speed
        ;-Delay may need to increase
        ^!Delay 2
        ;---
        ^!Close Discard
        ^!Open ^%new%
        ^!Clearvariables
      • Jody
        Hi Harvey ... Thanks, but I never did think there was a problem. ;) We were just discussing different methods mainly. Now, Manuel has another to work with,
        Message 3 of 10 , Feb 7, 2001
        • 0 Attachment
          Hi Harvey

          >If you haven't solved the codedate task yet here is my attempt.

          Thanks, but I never did think there was a problem. ;) We were
          just discussing different methods mainly. Now, Manuel has
          another to work with, but he posted what he needed. I guess
          everybody is happy now and you made your version too. :)


          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://www.egroups.com/group/ntb-clips
        Your message has been successfully submitted and would be delivered to recipients shortly.