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

21801Re: [Clip] Re: Clip to copy and rename files

Expand Messages
  • Alec Burgess
    May 29, 2011
    • 0 Attachment
      Mike: just a guess but perhaps

      c:\d^%d% in:
      ^!IfPathExist "c:\d^%d%" File_Loop Else End

      does not exist. Insert ^!setdebug ON and step through one line at time.

      Regards ... Alec

      On 2011-05-29 06:29, Mike Breiding - Morgantown WV wrote:
      > On 5/28/2011 5:15 PM, diodeom wrote:
      >> Mike Breiding wrote:
      >> >
      >> > Below is part of a folder tree.
      >> > In each folder named "orig" are .jpg files named in sequence:
      >> > photo0000001.jpg
      >> > photo0000002.jpg
      >> > photo0000003.jpg
      >> > etc.
      >> > The parent folder for "orig" is "d1", "d2", "d3", etc.
      >> >
      >> > What I would like to accomplish is to copy all files in the "orig"
      >> > folders, to an "all_files" folder and have them renamed after the "d*"
      >> > directory.
      >> >
      >
      >> Here's one of the ways to do it. Please make sure beforehand that
      >> "c:\all_files" exists.
      >
      > I cannot get this to do anything.
      > When I added the clip below to NT 6.12 with "Add from Clipboard" or "Add
      > New Clip".
      > The clip is created but when I click on the clip, nothing happens.
      >
      > What am I missing?
      > Thanks for the help.
      > -Mike
      >
      >
      >> ^!Set %d%=0
      >> :Dir_Loop
      >> ^!Set %f%=0
      >> ^!Inc %d%
      >> ^!IfPathExist "c:\d^%d%" File_Loop Else End
      >> :File_Loop
      >> ^!Inc %f%
      >> ^!Set %name%=photo^$StrCopyRight("000000^%f%";7)$.jpg
      >> ^!IfFileExist "c:\d^%d%\orig\^%name%" Next Else Dir_Loop
      >> ^!CopyFile "c:\d^%d%\orig\^%name%" "c:\all_files"
      >> ^!RenameFile "c:\all_files\^%name%" "c:\all_files\d^%d%_^%name%"
      >> ^!Goto File_Loop
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
      >
    • Show all 10 messages in this topic