Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

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

    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.

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

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

    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?
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

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

    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.

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  4. #4
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

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

    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.

  5. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

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

    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.

  6. #6
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,580
    Thanks
    5
    Thanked 1,058 Times in 927 Posts

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

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

    Joe
    Joe

  7. #7
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

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

    Not sure how to post a screen-shot, so I'll describe the shortcut properties instead.

    Program Tab:
    Cmd Line = C:CRYSTALINTERPATHCOPYDATA.BAT
    Working = C:CRYSTALINTERPATH

    The remainder of the Tabs are blank or default settings.

  8. #8
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

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

    Thanks everyone for your advice, I have just found the solution in this TechNet article:

    http://www.microsoft.com/technet/treeview/...kc_fil_rbrx.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •