Batch files query

Forum Windows XP : Windows XP General Discussion - Batch files query

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

 

I have a batch file which copies key folders and files between hard disks -

xcopy c:\progra~1\*.* /s d:\progra~1\progra~1\

It would seem that although it will accept only truncated folder and file
names (e.g. progra~1) for the source, sub folder and file names are written
to the target drive full length.

Am I right in thinking that source names have to be written in the truncated
form (after all it is, basically a DOS command)? if not how can this be
done?

Thanks.

Bill Ridgeway
Computer Solutions

Sponsored Links
Register or log in to remove.
- 0 +

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

 

Open below URL and scroll down to "Long Filenames at the Command Prompt".
File Names in Windows XP. Hope this helps.
http://www.microsoft.com/resources [...] l_rbrx.asp

Windows XP DOS Commands (click on Xcopy)
http://www.fsref.com/pr/dosxp.htm
--
Some days you're the windshield,
some days you're the bug.


"Bill Ridgeway" wrote:

> I have a batch file which copies key folders and files between hard disks -
>
> xcopy c:\progra~1\*.* /s d:\progra~1\progra~1\
>
> It would seem that although it will accept only truncated folder and file
> names (e.g. progra~1) for the source, sub folder and file names are written
> to the target drive full length.
>
> Am I right in thinking that source names have to be written in the truncated
> form (after all it is, basically a DOS command)? if not how can this be
> done?
>
> Thanks.
>
> Bill Ridgeway
> Computer Solutions
>
>
>

Reply to Byte

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

 

Using XPPro and the Command Prompt I was able to use xcopy to copy long
filenames and their short equivalent to another directory while preserving
the information for both. So, I presume that it doesn't matter which you use
- and that both will be preserved during the operation. You can try this
yourself by using the dir /x command to monitor the process.

"Bill Ridgeway" wrote:

> I have a batch file which copies key folders and files between hard disks -
>
> xcopy c:\progra~1\*.* /s d:\progra~1\progra~1\
>
> It would seem that although it will accept only truncated folder and file
> names (e.g. progra~1) for the source, sub folder and file names are written
> to the target drive full length.
>
> Am I right in thinking that source names have to be written in the truncated
> form (after all it is, basically a DOS command)? if not how can this be
> done?
>
> Thanks.
>
> Bill Ridgeway
> Computer Solutions
>
>
>

Reply to Anonymous
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > Batch files query
Go to:

There are 1100 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them