• MS-DOS Copy and Long File Names (Windows XP Pro SP1)

    Home » Forums » AskWoody support » Windows » Windows Vista, XP and earlier » Questions: Vista, XP back to 3.1 » MS-DOS Copy and Long File Names (Windows XP Pro SP1)

    Author
    Topic
    #393321

    I have just migrated (finally) from Windows 98 to Windows XP, so please excuse the dumb question. I have a number of shortcuts to MS-DOS batch files that copy specific files from one folder to another (often with long file names), for example:

    copy c:myfolder1subfolder1filename.* c:myfolder2

    The batch file runs fine, but the shortcut fails, with the error “Path not found”.

    If I enclose the paths with ” (as I did for MS-DOS in Windows 98), for example:

    copy “c:myfolder1subfolder1filename.*” “c:myfolder2”

    It fails with “Too many parameters”.

    I must be doing something wrong, but I can’t find any information on how to do it correctly. I would be grateful for some advice.

    Viewing 3 reply threads
    Author
    Replies
    • #712278

      You appear to be doing the correct things. It’s only necessary to surround a file path with double quotes if there is/are one or more blanks embedded, but surrounding in double quotes shouldn’t cause a problem if there are no embedded blanks.

      Can you post the exact copy command which fails, please?

    • #712279

      You appear to be doing the correct things. It’s only necessary to surround a file path with double quotes if there is/are one or more blanks embedded, but surrounding in double quotes shouldn’t cause a problem if there are no embedded blanks.

      Can you post the exact copy command which fails, please?

    • #712299

      Can you post a sample of a true path and file that is giving you the error?

      Your current sample shows a breif sample where nothing exceeds the limints of DOS. But the real world will add up to, to long of a path.

      DaveA I am so far behind, I think I am First
      Genealogy....confusing the dead and annoying the living

      • #712318

        According to the error message you’ve got, you mistype “myfolder1” or “subfolder1”. Check with Windows Explorer for exact folder and filenames. Remember, if “myfolder2” does not exist, WindowsXP will copy your “filename.*” file as “myfolder2” without extension.

      • #712319

        According to the error message you’ve got, you mistype “myfolder1” or “subfolder1”. Check with Windows Explorer for exact folder and filenames. Remember, if “myfolder2” does not exist, WindowsXP will copy your “filename.*” file as “myfolder2” without extension.

      • #712541

        Thanks for your prompt responses everyone. Firstly let me clarify a little. The problem I am having is with existing batch files and existing shortcuts (desktop icons) to them that have worked fine for years on a Windows 98 PC. Having moved to Windows XP Pro, the problem is with running the SHORTCUTS to the MS-DOS batch files, NOT the batch files themselves (which strangely enough run just fine, as is).

        An example of a specific line in a batch file that fails with “Path not found” is:

        copy c:visionhomeinterpathcustomer.* c:interpath

        When I run the batch file directly, it works fine. I have tried to enclose the paths in the batch file in ” but then I get the error “Too many parameters”. I have also tried to edit the shortcut by enclosing the Cmd Line and Working paths in ” and selecting Windows 98 compatibility mode, all to no avail. Windows XP actually strips the ” after running the shortcut but it stills fails with the same errors.

        I’d be grateful for your help.

        • #712636

          Can you post a screen shot of the properties for the shortcut?

          Joe

          --Joe

        • #712637

          Can you post a screen shot of the properties for the shortcut?

          Joe

          --Joe

      • #712542

        Thanks for your prompt responses everyone. Firstly let me clarify a little. The problem I am having is with existing batch files and existing shortcuts (desktop icons) to them that have worked fine for years on a Windows 98 PC. Having moved to Windows XP Pro, the problem is with running the SHORTCUTS to the MS-DOS batch files, NOT the batch files themselves (which strangely enough run just fine, as is).

        An example of a specific line in a batch file that fails with “Path not found” is:

        copy c:visionhomeinterpathcustomer.* c:interpath

        When I run the batch file directly, it works fine. I have tried to enclose the paths in the batch file in ” but then I get the error “Too many parameters”. I have also tried to edit the shortcut by enclosing the Cmd Line and Working paths in ” and selecting Windows 98 compatibility mode, all to no avail. Windows XP actually strips the ” after running the shortcut but it stills fails with the same errors.

        I’d be grateful for your help.

    • #712300

      Can you post a sample of a true path and file that is giving you the error?

      Your current sample shows a breif sample where nothing exceeds the limints of DOS. But the real world will add up to, to long of a path.

      DaveA I am so far behind, I think I am First
      Genealogy....confusing the dead and annoying the living

    Viewing 3 reply threads
    Reply To: MS-DOS Copy and Long File Names (Windows XP Pro SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: