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

14047Re: [Clip] Newbie silly question; mkdir from list

Expand Messages
  • hsavage
    Jul 13, 2005
      Bob McAllister wrote:
      > Try adding a ^$StrTrim to the line that creates the variable name, so
      > that it reads.
      > ^!Set %foldername%=^$StrTrim(^$GetLine$)$
      > I was also getting an I/O error report (in my case 161) and guessed it
      > was some (invisible) junk on the line being grabbed.
      > Bob

      Philip, Adrian, Jody and Bob,

      Here is the latest incarnation of the clip Phillip needs.

      Thanks to Jody for the reminder about the ^!Dos command, and thanks to
      Bob for the suggestion of ^$StrTrim("")$, just in case the list has
      extra spaces in some of the lines.

      I took ^$StrTrim("")$ a step further and used it when creating a new
      target folder with 'Mkdir', just in case you accidentally bump the
      spacebar after typing a new target folder.

      The ^!Delay seems to be necessary to allow creation of a completely new
      target folder, you can try it without the delay if you like.

      The clip now doesn't seem to have any restrictions, it works fine for
      me, how about you.

      ^!SetScreenUpdate 0
      ; prompts for path, new path may be manually entered when clip is run
      ^!Set %dirpath%=^?{(T=D)Pick the TargetFolder=C:\PROJECT\a2d tech
      ; creates dirpath if it doesn't exist
      ^!IfPathExist "^%dirpath%" SKIP_2
      ^!Dos MkDir "^$StrTrim(^%dirpath%)$"
      ^!Delay 2
      ; jumps to top of document
      ^!Jump 1
      ; begins loop
      ^!Set %lastrow%=^$GetRow$
      ^!Set %foldername%="^$StrTrim(^$GetLine$)$"
      ^!MkDir "^%dirpath%^%foldername%\"
      ^!Jump +1
      ; exit loop at end of file
      ^!If ^$GetRow$=^%lastrow% END
      ^!If ^$GetRow$ > ^$GetTextLineCount$ END ELSE LOOP

      hrs > hsavage@...
    • Show all 19 messages in this topic