Find the file and copy file/path name

Find the file and copy file/path name

5
NewbieNewbie
5

    Nov 07, 2007#1

    Hi all,

    all my project related files are in say c:\Hsb\ folder and I've the file name which I need to search inside this folder. There are several sub-folders in Hsb folder. Can I search for the file name and copy the entire path including filename thru macros?

    It will help me a lot. Please respond if u know the solution.

    thanx.

    6,686585
    Grand MasterGrand Master
    6,686585

      Nov 07, 2007#2

      The following macro assumes that the file name which you want with full path is in the current clipboard and will be replaced in the clipboard with the full file name.

      For details about the first part of the macro see Run Macro on all files within folder. You have not posted all necessary information to post here the macro which surely works for you.

      Replace the second line of the macro with following if you use a project.

      FindInFiles ProjFiles "" "" ""

      The macro property Continue if a Find with Replace not found or Continue if search string not found must be checked for this macro.

      UnixReOff
      FindInFiles Recursive "C:\Hsb\" "*" ""
      Loop
      Find MatchCase Up "Search complete, found "
      IfFound
      ExitLoop
      Else
      NextWindow
      EndIf
      EndLoop
      DeleteLine
      Top
      UnicodeToASCII
      Find RegExp "%*^c*$"
      IfFound
      Copy
      EndIf
      CloseFile NoSave

      Add UnixReOn or PerlReOn (v12+ of UE) at the end of the macro if you do not use UltraEdit style regular expressions by default - see search configuration. Macro command UnixReOff sets the regular expression option to UltraEdit style.
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Nov 11, 2007#3

        Thanks Mofi,

        I am sure that it will work for me. I need only to update my UltraEdit which is currently of version 10.10c. Thanks a lot. :)  :D