--- In xxcopy@yahoogroups.com, "ruharc" <ruharc@...> wrote:
>
> What I want to do is quite simple. I want to copy one File
> to a specific folder and rename it in the process.
>
> Thats what I thought it has to look like:
> xxcopy C:\temp\cli_1304.trc L:\Folder\bla.trc
>
> I want to copy "cli_1304.trc" to "L:\Folder\bla.trc" and
> its name should be "bla.trc". But it always creates a
> folder "bla.trc" and copies the file into it with the
> original name.
>
> I sadly couldn't find a flag where I can tell him that the
> dst is a fully quallifed filename.
>
> Thanks for your help
> Ruh
>
> FYI:
> The program that I am currently writeing crawls through
> a folder and copies all the files and folders to a
> different place (the new file-/foldername is written
> in an database) and my biggest problem is, that the
> windows copymehtod dosen't support a filelength of more
> then 260 characters. My source is on windows and my
> destination is a linux so it should be able to handle it.
As a general rule, xxcopy does not do any file renaming
and always treats the destination as a directory path. There
are some exceptions but I don't think they will help for
your problem.
One possible workaround for the long path problem may be
to use the SUBST or NET USE command to map the path to a
drive letter and thereby truncate the path length e.g.
SUBST P: "C:\very long path\to your\source directory"
COPY P:\cli_1304.trc L:\Folder\bla.trc
Garry