<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic batch file for finding full path of a file in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009496#M8132</link>
    <description>Hi experts,&lt;BR /&gt;&lt;BR /&gt;I am new to batch file scripting.can any body help me to create a batch file which accepts a file name from the user.this file name has to be searched in the computer and the full path should be returned.if the file doesnt exist it should display an error.&lt;BR /&gt;&lt;BR /&gt;awaiting your reply&lt;BR /&gt;thanx in advance&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 30 May 2007 01:11:01 GMT</pubDate>
    <dc:creator>prajith</dc:creator>
    <dc:date>2007-05-30T01:11:01Z</dc:date>
    <item>
      <title>batch file for finding full path of a file</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009496#M8132</link>
      <description>Hi experts,&lt;BR /&gt;&lt;BR /&gt;I am new to batch file scripting.can any body help me to create a batch file which accepts a file name from the user.this file name has to be searched in the computer and the full path should be returned.if the file doesnt exist it should display an error.&lt;BR /&gt;&lt;BR /&gt;awaiting your reply&lt;BR /&gt;thanx in advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 May 2007 01:11:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009496#M8132</guid>
      <dc:creator>prajith</dc:creator>
      <dc:date>2007-05-30T01:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: batch file for finding full path of a file</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009497#M8133</link>
      <description>I don't know how to convert this into a batch file but this is how it's done from the Command Prompt:&lt;BR /&gt;&lt;BR /&gt;CD\&lt;BR /&gt;DIR &lt;FILENAME&gt; /s&lt;BR /&gt;&lt;BR /&gt;Make a great day!&lt;BR /&gt;&lt;BR /&gt;Roger&lt;/FILENAME&gt;</description>
      <pubDate>Wed, 30 May 2007 05:54:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009497#M8133</guid>
      <dc:creator>Roger Faucher</dc:creator>
      <dc:date>2007-05-30T05:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: batch file for finding full path of a file</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009498#M8134</link>
      <description>Hi Prajith,&lt;BR /&gt;&lt;BR /&gt;@echo off&lt;BR /&gt;cd \&lt;BR /&gt;set /p fileName="Insert file name to be searched.: "&lt;BR /&gt;title searching file&lt;BR /&gt;echo.&lt;BR /&gt;dir %filename% /s &lt;BR /&gt;pause&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note: if the file has blanks between words, users must use ""&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;Insert file name: "NCRM TaskForce Minutes 2006_11_15.doc"&lt;BR /&gt;&lt;BR /&gt;hope that will do.&lt;BR /&gt;&lt;BR /&gt;Tnks.</description>
      <pubDate>Thu, 31 May 2007 04:28:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009498#M8134</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2007-05-31T04:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: batch file for finding full path of a file</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009499#M8135</link>
      <description>hi prajith,&lt;BR /&gt;&lt;BR /&gt;You can run this bath like this example: &lt;BR /&gt;&lt;BR /&gt;FilePath.bat filename&lt;BR /&gt;&lt;BR /&gt;If the file file as spaces between you have to use "" like for example: &lt;BR /&gt;&lt;BR /&gt;FilePath.bat "file name.txt"&lt;BR /&gt;&lt;BR /&gt;Note: All files found will be outputted in the end, and the last or only file found will be saved in the variable %filepath" so you can used it latter or even used it on another script.&lt;BR /&gt;&lt;BR /&gt;***copy the following code to a text file, and change the extension to .bat or .cmd.***&lt;BR /&gt;&lt;BR /&gt;::----------------------------------------&lt;BR /&gt;@echo off&lt;BR /&gt;set filename=%1&lt;BR /&gt;set filenamePath="%userprofile%\desktop\filenamePath.txt"&lt;BR /&gt;&lt;BR /&gt;c:&lt;BR /&gt;cd\&lt;BR /&gt;&lt;BR /&gt;dir %filename% /s/b | findstr %filename% &amp;gt; %filenamePath%&lt;BR /&gt;&lt;BR /&gt;for /f "usebackq tokens=1 delims=" %%i in (%filenamePath%) do (&lt;BR /&gt; set filePath=%%i&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;type %filenamepath%&lt;BR /&gt;del %filenamePath%&lt;BR /&gt;::------------------------------------------&lt;BR /&gt;&lt;BR /&gt;I don't really know why you need this, since a "dir /s/a filename" will find the file you need, but here it is anyway.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;best regards,&lt;BR /&gt;Hugo Tigre</description>
      <pubDate>Thu, 31 May 2007 05:15:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/batch-file-for-finding-full-path-of-a-file/m-p/4009499#M8135</guid>
      <dc:creator>Hugo Tigre</dc:creator>
      <dc:date>2007-05-31T05:15:50Z</dc:date>
    </item>
  </channel>
</rss>

