Results 1 to 4 of 4

Thread: search for right file path if exist on Dos

  1. #1
    Join Date
    Apr 2009
    Posts
    8

    search for right file path if exist on Dos

    Hello
    On my DOS,I have a command ran from a file with arguments but bizarrely the drive path is likely wrong but the folder seems to be path is right.

    but i doubt If it, because am i able to browse the drives for the right drive path, same time i can update it . I would just need to update c:\ to e:\ in the file


    any thoughts??

  2. #2
    Join Date
    May 2008
    Posts
    4,085

    Re: search for right file path if exist on Dos

    If you are not able to check for the existence of a directory, need to do check for a file within the directory... fortunately you can plug in the DOS constant NUL with the same results...

    If exist c:\nul you would need to do to get your batch working is change the plain old r: to r:\nul

    good luck...

  3. #3
    Join Date
    Apr 2008
    Posts
    3,267

    Re: search for right file path if exist on Dos

    This xp batch file which I am trying to make work in 4dos
    It gets a variable of a complete path of a file and then converts it
    into only the path and then changes into that folder.
    getpath.cmd
    cd\
    set path=z:\boot\xosl115\xosl\install.exe
    FOR /F "TOKENS=*" %%G IN ("%path%") DO SET X=%%~dpG
    echo %x%
    cd/d %x%
    pause
    4DOS is a super set of COMMAND.COM, 4NT/TCC is a superset of CMD.EXE. the syntax is CMD.

    cdd %@path[%@full[filename]]

    enojy...

  4. #4
    Dr. V Guest

    Re: search for right file path if exist on Dos

    Windows Vista you copy a file or folder's path to the Clipboard. hold down the Shift key and right-click a file or folder in Explorer"Copy as Path" when you see the option. Select it and the complete file path will be in the Clipboard, ready for pasting virtually anywhere. The path allows you to paste on a DOS command box...

Similar Threads

  1. Path does not exist when opening PDF in Acrobat Read
    By Hevel in forum Windows Software
    Replies: 6
    Last Post: 16-03-2012, 08:21 AM
  2. The update file does not exist in AVG 2011
    By Tabita in forum Networking & Security
    Replies: 4
    Last Post: 19-02-2011, 01:48 PM
  3. Dead Space 2 Error file (.htm) does not exist
    By ProfilerJI in forum Video Games
    Replies: 4
    Last Post: 03-02-2011, 07:41 PM
  4. Error : the specified path does not exist
    By chaosblade in forum Operating Systems
    Replies: 5
    Last Post: 05-01-2011, 11:01 PM
  5. The File or Folder Does Not Exist
    By 4472 in forum Vista Help
    Replies: 6
    Last Post: 21-07-2007, 01:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,728,068,325.78666 seconds with 17 queries