Page 1 of 1 1
Topic Options
#12289 - 2001-09-14 02:59 PM XCOPY file silently, renamed destination with no suffix?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
I'm stuck.

i want to XCOPY (NT4) a file that has a suffix and put it on another place and at the same time rename it so that it doesn't have a suffix, how do I silently do this without verifying F for file?

code:
XCOPY \\<computer>\<share>\test.* D:\test\test 

(test.* is a single file with a variable suffix that I want to remove for it's destination).
_________________________
The tart is out there

Top
#12290 - 2001-09-14 03:09 PM Re: XCOPY file silently, renamed destination with no suffix?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Ah!

KiX's own COPY command did the job!

code:
COPY "\\<computer>\<share>\test.*" "D:\test\test" 

Hmm... but shouldn't you be able to do this with XCOPY too?
_________________________
The tart is out there

Top
#12291 - 2001-09-14 11:18 PM Re: XCOPY file silently, renamed destination with no suffix?
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
You can do it with XCOPY, but you will get prompted if it is a file or directory

xcopy c:\temp\test.* f:\temp\test

will ask if it ia a File or Directory
I don't know of any switch to tell it that it is a file as part of the command.

And it only works with a single file. If you have multiple files, the last will overwrite each one. XCOPY was meant for copying multiple files and folders, not for mass renaming of files.

Top
#12292 - 2001-09-17 09:08 AM Re: XCOPY file silently, renamed destination with no suffix?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
quote:
(test.* is a single file with a variable suffix that I want to remove for it's destination).

Thx anyways NTDOC.

_________________________
The tart is out there

Top
#12293 - 2001-10-21 06:08 AM Re: XCOPY file silently, renamed destination with no suffix?
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Did you have already a solution?

See for ideas about "how to find specified file(s)?" topic
http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=2&t=002316

Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#12294 - 2001-10-22 09:11 AM Re: XCOPY file silently, renamed destination with no suffix?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Hi there MCA!

Well, I kindo of have a solution, with KiX32's copycommand, but not in xcopy...

Greets, Masken

_________________________
The tart is out there

Top
#12295 - 2001-10-22 01:52 PM Re: XCOPY file silently, renamed destination with no suffix?
Anonymous
Unregistered


This isn't pretty, but it works.

Create a file, say f.txt which just contains the letter f.

Run the Xcopy as following

xcopy c:\test.bat c:\temp\test < c:\f.txt

This will automatically enter f as a response to the question. You can use this technique with loads of DOS progs

Cheers

Nick

Top
#12296 - 2001-10-22 05:12 PM Re: XCOPY file silently, renamed destination with no suffix?
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
hehe.. ok thanks Nick Ford, I never thought of piping back the filename to XCOPY

Thx for the insight

_________________________
The tart is out there

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org