A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

XCOPY Prompt



 
 
Thread Tools Rating: Thread Rating: 3 votes, 3.67 average. Display Modes
  #31  
Old April 26th 12, 03:27 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default XCOPY Prompt

On Wed, 25 Apr 2012 22:44:55 +0100, choro wrote:

On 25/04/2012 15:48, Char Jackson wrote:
On Wed, 25 Apr 2012 12:36:04 +0100, wrote:

On 25/04/2012 02:39, Char Jackson wrote:
On Wed, 25 Apr 2012 00:45:33 +0100, wrote:

On 24/04/2012 17:51, Gene Wirchenko wrote:
On Mon, 23 Apr 2012 16:05:28 -0700, Bob
wrote:

On 4/23/2012 2:18 PM, Gene Wirchenko wrote:
Dear Win7ers:

I am working between two systems: an XP system and a 7 system. I
copy files back and forth on a USB stick. Some of the filenames are
long, and I have old utility software that is limited to the 8.3 file
format. I need short filenames, and I can not trust the the short
names generated by Windows will be consistent.

I created a batch file to make a short filename version:
del WFCNew.asp
xcopy WorkFunctionCodes_New.asp WFCNew.asp /v
^1^^^^^^^^^^^^^^^^^^^^^^^ ^2^^^^^^^^
1 is the source; 2 is the destination.

[snip]

I don't see a source and/or destination in your batch file.

If the file is already on the USB stick, why don't use just use ren or
rename?

I want a copy with a different name.

The simplest way is to copy and paste the file to another folder, rename
it there and then drag and drop it to the original folder. IF they are
in different drives then use the CUT& PASTE method.If you want both
copies of the file in the same folder that is...

Remember the motto, *Keep it simple*.

There's nothing "simple" about all of that rigmarole. I fail to see
the reason, and I fail to see why it would be any easier, to rename
files in one folder versus another. Just rename them where they lie.

But I thought he wanted *two* copies of the same file under different
names. Hence my suggestion... Got it?!


That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

Otherwise you can rename a file in loco as you suggest. But you cannot
rename a file in loco and still retain the old version with the old
original filename.


That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

I sound like a broken record, but these kinds of basic file operations
are, well, basic. They've been with us for over 30 years now.


No need for xcopy at all. Just open the file, *Save as...* and give it a
different filename -- may I suggest a dash or an underscore just before
the dot and the file extension e.g. Filename-.doc or Filename_.doc And
it's done! And you have 2 copies in the same folder.


There's no need to open any files. You seem to have a knack for coming
up with convoluted solutions. :-)

--

Char Jackson
Ads
  #32  
Old April 26th 12, 03:43 AM posted to alt.windows7.general
Bob Hatch
external usenet poster
 
Posts: 206
Default XCOPY Prompt

On 4/25/2012 11:08 AM, Gene Wirchenko wrote:
On Wed, 25 Apr 2012 09:56:01 -0700, Bob
wrote:

On 4/25/2012 9:37 AM, Gene Wirchenko wrote:
On Tue, 24 Apr 2012 11:41:32 -0700, Bob
wrote:

[snip]

Once again, YOU DID NOT HAVE A SOURCE AND DESTINATION for the file. You
must have a SOURCE AND DESTINATION for copy or xcopy to work. It's not
an optional thing.

I did. A filename is source and is a destination.


I had, based on your post, assumed (I know, shouldn't do that) that you
were copying the file to a new location and renaming it at the same
time. What's the drive designation of the USB stick? E, F, G?


I gave you the exact command lines. Since neither drives nor
directories were specified, the default ones apply.

Sincerely,

Gene Wirchenko


You're right. It's most likely a broken OS on your machine and something
you can most likely fix on your own. :-(


--
“There is no worse tyranny than to force a man
to pay for what he does not want merely because
you think it would be good for him.”
? Robert A. Heinlein
  #33  
Old April 26th 12, 06:20 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default XCOPY Prompt

On Wed, 25 Apr 2012 19:43:09 -0700, Bob Hatch
wrote:

On 4/25/2012 11:08 AM, Gene Wirchenko wrote:
On Wed, 25 Apr 2012 09:56:01 -0700, Bob
wrote:

On 4/25/2012 9:37 AM, Gene Wirchenko wrote:
On Tue, 24 Apr 2012 11:41:32 -0700, Bob
wrote:

[snip]

Once again, YOU DID NOT HAVE A SOURCE AND DESTINATION for the file. You
must have a SOURCE AND DESTINATION for copy or xcopy to work. It's not
an optional thing.

I did. A filename is source and is a destination.


I had, based on your post, assumed (I know, shouldn't do that) that you
were copying the file to a new location and renaming it at the same
time. What's the drive designation of the USB stick? E, F, G?


I gave you the exact command lines. Since neither drives nor
directories were specified, the default ones apply.

Sincerely,

Gene Wirchenko


You're right. It's most likely a broken OS on your machine and something
you can most likely fix on your own. :-(


Are you saying it works differently on your machine? If so, perhaps
it's your machine that's broken.

--

Char Jackson
  #34  
Old April 26th 12, 07:47 AM posted to alt.windows7.general
Bob Hatch
external usenet poster
 
Posts: 206
Default XCOPY Prompt

On 4/25/2012 10:20 PM, Char Jackson wrote:
On Wed, 25 Apr 2012 19:43:09 -0700, Bob
wrote:

On 4/25/2012 11:08 AM, Gene Wirchenko wrote:
On Wed, 25 Apr 2012 09:56:01 -0700, Bob
wrote:

On 4/25/2012 9:37 AM, Gene Wirchenko wrote:
On Tue, 24 Apr 2012 11:41:32 -0700, Bob
wrote:

[snip]

Once again, YOU DID NOT HAVE A SOURCE AND DESTINATION for the file. You
must have a SOURCE AND DESTINATION for copy or xcopy to work. It's not
an optional thing.

I did. A filename is source and is a destination.

I had, based on your post, assumed (I know, shouldn't do that) that you
were copying the file to a new location and renaming it at the same
time. What's the drive designation of the USB stick? E, F, G?

I gave you the exact command lines. Since neither drives nor
directories were specified, the default ones apply.

Sincerely,

Gene Wirchenko


You're right. It's most likely a broken OS on your machine and something
you can most likely fix on your own. :-(


Are you saying it works differently on your machine? If so, perhaps
it's your machine that's broken.


Every batch file I've ever written to do xcopy or copy has required me
to specify the location of the action to be taken because I run the
batch file from the desktop, it took me a while, but I finally got that
he was placing everything in the c:\Users\"whatevername" directory and
working from there.

If I write a batch file similar to the OP's and use copy rather than
xcopy, and use file names identical to the OP's except with a .txt
extension and place the batch file in c:\users\bob hatch it works.

My batch file looks like this:
echo on
copy WorkFunctionCodes_New.txt WFCNew.txt /y/v
copy WorkFunctionCodes_New_Process01.txt WFCNP01.txt /y/v


The /y suppresses prompting to confirm over writing an existing file and
eliminates the need to delete the old files.

If I use the xcopy command, I get the same error he gets. No error with
the copy command.

My confusion came about because when he mentioned the USB stick, I
assumed, and yes I shouldn't have done that, that he was trying to do
this on the USB stick, which is what I would do if I were trying to
accomplish the same task. Or maybe I wouldn't. I would most likely add 4
lines at the end of the batch file to copy them to the USB stick if I
wanted all files on the USB stick, 2 lines if I only wanted the short
named ones, and I would use the copy command, not xcopy. I use xcopy to
copy entire directories, not single files.

Part of the problem is that I think that others will do things the same
way I would, and that's another thing I shouldn't do.

--
“There is no worse tyranny than to force a man
to pay for what he does not want merely because
you think it would be good for him.”
? Robert A. Heinlein
  #35  
Old April 26th 12, 05:48 PM posted to alt.windows7.general
Steve Hayes[_2_]
external usenet poster
 
Posts: 1,089
Default XCOPY Prompt

On Wed, 25 Apr 2012 23:47:05 -0700, Bob Hatch wrote:

Every batch file I've ever written to do xcopy or copy has required me
to specify the location of the action to be taken because I run the
batch file from the desktop, it took me a while, but I finally got that
he was placing everything in the c:\Users\"whatevername" directory and
working from there.


I've never been able to find the Desktop to run anything from

For what it's worth, this is the batchfile I use to copy files to my flash
drive to use on my laptop (where I have another batch file to copy them on to
the hard drive there. The file is DSK2FLSH.BAT and the flash drive is drive J:

echo Copying transfer files from Steve's Desktop to Flash ROM
c:
Echo Copying FHS files
e:
cd \Family\Famhist
move *.fil f:\FHSBack
pause
move *.tmp f:\FHSback
move *.ged f:\FHSback
pause
move *.bak f:\FHSback
pause
Echo Copying askSam files
cd \asksam
move *.tmp f:\tempback
move *.bak f:\tempback
move *.sav f:\tempback
cd \inmagic
move *.tmp f:\tempback
move *.bak f:\tempback
Echo Archiving data files
f:
cd \Archives
arj u -r FHSTrans e:\family
arj u -r Inmagic e:\Inmagic
arj u -r Textfile g:\Textfile
arj u -r AskSam e:\asksam
arj u -r rdfFiles e:\paf\rdfdata\*.doc
arj u -r rdfFiles e:\paf\rdfdata\*.dat
arj u -r askSam4 g:\stevedoc\*.ask
arj u -r jotnote g:\stevedoc\*.jot
arj u -r PAF4file g:\stevedoc\*.paf
arj u -r htmldocs e:\html\*.htm
arj u -r htmldocs e:\html\*.jpg
arj u -r htmldocs e:\html\*.gif
arj d Inmagic *.tmp
arj d Textfile *.tmp
bac *.arj j:
Echo Copying Legacy data files
e:
cd \Legacy\Data
move *.tmp f:\tempback
move *.bak f:\tempback
move *.zip f:\tempback
move *.jpg f:\tempback
move *.tmp f:\tempback
move *.doc f:\tempback
bac *.* j:\Legacy\Data
cd \Legacy\Pictures
move *.doc f:\tempback
move *.zip f:\tempback
move *.lnk f:\tempback
bac *.* j:\Legacy\Pictures
j:
cd \Legacy\Data
move *.tmp f:\tempback
move *.bak f:\tempback
move *.zip f:\tempback
move *.jpg f:\tempback
move *.tmp f:\tempback
move *.doc f:\tempback
move *.lnk f:\tempback
cd \Legacy\Pictures
move *.doc f:\tempback
move *.zip f:\tempback
move *.lnk f:\tempback
move *.bak f:\tempback
move *.dat f:\tempback
move *.txt f:\tempback
cd \
c:
cd \windows
bac outlook.pst j:\
e:
cd \Treepad
bac *.hjt j:\
pause
Dir j:
pause

And the one to copy them back again when I've been working on the laptop is
FLSH2DSK.BAT:

echo Copying files from Flash drive to Steve's desktop computer
pause
e:
cd \
arj x -u -y j:asksam
arj x -u -y j:inmagic
arj x -u -y j:FHSTrans
arj x -u -y j:rdffiles
arj x -u -y j:htmldocs
g:
cd \
arj x -u -y j:Textfile
arj x -u -y j:asksam4
arj x -u -y j:PAF4file
arj x -u -y j:jotnote
j:
cd \legacy\data
bac *.* e:\legacy\data
cd \legacy\pictures
bac *.* e:\legacy\pictures
cd \
bac outlook.pst c:\windows
bac *.hjt e:\Treepad
pause
exit

As in the OP's question, the BAC.COM command is an old DOS command that only
understands 8.3 filenames.

I use it because it copies files to the destination only when there is a newer
version on the source drive. If the versions are the same it does not copy.

There are also some extraneous move commands. They are there because if I
should type the command when the flash drive is not plugged in, it copies some
files to the wrong directories, and the move command moves them out if it
finds them there. It also moves old backup files.


--
Steve Hayes from Tshwane, South Africa
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk
  #36  
Old April 26th 12, 06:59 PM posted to alt.windows7.general
Zaphod Beeblebrox
external usenet poster
 
Posts: 868
Default XCOPY Prompt

On Thu, 26 Apr 2012 18:48:16 +0200, "Steve Hayes"
wrote in article
...


As in the OP's question, the BAC.COM command is an old DOS command that only
understands 8.3 filenames.

And as a consequence it is a 16-Bit program, so it won't run under
Windows 7 64-Bit natively (though it will in XP Mode).

Just in case someone doesn't realize that...

--
Zaphod

Vell, Zaphod's just zis guy, ya know? - Gag Halfrunt
  #37  
Old April 26th 12, 10:02 PM posted to alt.windows7.general
Steve Hayes[_2_]
external usenet poster
 
Posts: 1,089
Default XCOPY Prompt

On Thu, 26 Apr 2012 13:59:40 -0400, Zaphod Beeblebrox
wrote:

On Thu, 26 Apr 2012 18:48:16 +0200, "Steve Hayes"
wrote in article
...


As in the OP's question, the BAC.COM command is an old DOS command that only
understands 8.3 filenames.

And as a consequence it is a 16-Bit program, so it won't run under
Windows 7 64-Bit natively (though it will in XP Mode).


Which is one of the reasons I switched to Windows 7 32-bit on my laptop (which
luckily came with a DVD with the 32-bit system on it).


--
Steve Hayes from Tshwane, South Africa
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk
  #38  
Old April 26th 12, 10:13 PM posted to alt.windows7.general
Bob Hatch
external usenet poster
 
Posts: 206
Default XCOPY Prompt

On 4/26/2012 9:48 AM, Steve Hayes wrote:
On Wed, 25 Apr 2012 23:47:05 -0700, Bob wrote:

Every batch file I've ever written to do xcopy or copy has required me
to specify the location of the action to be taken because I run the
batch file from the desktop, it took me a while, but I finally got that
he was placing everything in the c:\Users\"whatevername" directory and
working from there.


I've never been able to find the Desktop to run anything from

For what it's worth, this is the batchfile I use to copy files to my flash
drive to use on my laptop (where I have another batch file to copy them on to
the hard drive there. The file is DSK2FLSH.BAT and the flash drive is drive J:

echo Copying transfer files from Steve's Desktop to Flash ROM
c:
Echo Copying FHS files
e:
cd \Family\Famhist
move *.fil f:\FHSBack
pause
move *.tmp f:\FHSback
move *.ged f:\FHSback
pause
move *.bak f:\FHSback
pause
Echo Copying askSam files
cd \asksam
move *.tmp f:\tempback
move *.bak f:\tempback
move *.sav f:\tempback
cd \inmagic
move *.tmp f:\tempback
move *.bak f:\tempback
Echo Archiving data files
f:
cd \Archives
arj u -r FHSTrans e:\family
arj u -r Inmagic e:\Inmagic
arj u -r Textfile g:\Textfile
arj u -r AskSam e:\asksam
arj u -r rdfFiles e:\paf\rdfdata\*.doc
arj u -r rdfFiles e:\paf\rdfdata\*.dat
arj u -r askSam4 g:\stevedoc\*.ask
arj u -r jotnote g:\stevedoc\*.jot
arj u -r PAF4file g:\stevedoc\*.paf
arj u -r htmldocs e:\html\*.htm
arj u -r htmldocs e:\html\*.jpg
arj u -r htmldocs e:\html\*.gif
arj d Inmagic *.tmp
arj d Textfile *.tmp
bac *.arj j:
Echo Copying Legacy data files
e:
cd \Legacy\Data
move *.tmp f:\tempback
move *.bak f:\tempback
move *.zip f:\tempback
move *.jpg f:\tempback
move *.tmp f:\tempback
move *.doc f:\tempback
bac *.* j:\Legacy\Data
cd \Legacy\Pictures
move *.doc f:\tempback
move *.zip f:\tempback
move *.lnk f:\tempback
bac *.* j:\Legacy\Pictures
j:
cd \Legacy\Data
move *.tmp f:\tempback
move *.bak f:\tempback
move *.zip f:\tempback
move *.jpg f:\tempback
move *.tmp f:\tempback
move *.doc f:\tempback
move *.lnk f:\tempback
cd \Legacy\Pictures
move *.doc f:\tempback
move *.zip f:\tempback
move *.lnk f:\tempback
move *.bak f:\tempback
move *.dat f:\tempback
move *.txt f:\tempback
cd \
c:
cd \windows
bac outlook.pst j:\
e:
cd \Treepad
bac *.hjt j:\
pause
Dir j:
pause

And the one to copy them back again when I've been working on the laptop is
FLSH2DSK.BAT:

echo Copying files from Flash drive to Steve's desktop computer
pause
e:
cd \
arj x -u -y j:asksam
arj x -u -y j:inmagic
arj x -u -y j:FHSTrans
arj x -u -y j:rdffiles
arj x -u -y j:htmldocs
g:
cd \
arj x -u -y j:Textfile
arj x -u -y j:asksam4
arj x -u -y j:PAF4file
arj x -u -y j:jotnote
j:
cd \legacy\data
bac *.* e:\legacy\data
cd \legacy\pictures
bac *.* e:\legacy\pictures
cd \
bac outlook.pst c:\windows
bac *.hjt e:\Treepad
pause
exit

As in the OP's question, the BAC.COM command is an old DOS command that only
understands 8.3 filenames.

I use it because it copies files to the destination only when there is a newer
version on the source drive. If the versions are the same it does not copy.

There are also some extraneous move commands. They are there because if I
should type the command when the flash drive is not plugged in, it copies some
files to the wrong directories, and the move command moves them out if it
finds them there. It also moves old backup files.



And this is the batch file I use to copy pictures to my wife's laptop.

rem This is the program to Backup files to Marys Laptop computer.
cls
echo off
echo This program will Backup jpg pictures from Drive D to Marys Drive D.
rem
rem
rem
rem
echo To continue with the Backup Process press any key.


pause

echo on

cls
d:
cd pictures

U:
cd Pictures

d:
xcopy *.jpg U: /D/S/Y
exit


The switch's do the following.

/D Copies files whose sourse time is newer than the destination time.
/S Copies directories and sub-directories, except empty ones.
/Y Suppresses propting to confirm you waht to overwrite on existing
destination file.

The file is on, what Windows calls, the desktop. Click on the batch file
and away we go. :-)


--
“There is no worse tyranny than to force a man
to pay for what he does not want merely because
you think it would be good for him.”
? Robert A. Heinlein
  #39  
Old April 26th 12, 11:11 PM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default XCOPY Prompt

On Thu, 26 Apr 2012 14:13:02 -0700, Bob Hatch
wrote:

And this is the batch file I use to copy pictures to my wife's laptop.

rem This is the program to Backup files to Marys Laptop computer.
cls
echo off
echo This program will Backup jpg pictures from Drive D to Marys Drive D.
rem
rem
rem
rem
echo To continue with the Backup Process press any key.


pause


I probably would have written the header like this:

cls
echo off
echo This program will backup jpg pics from Drive D to Marys Drive D.
pause


echo on

cls
d:
cd pictures

U:
cd Pictures

d:
xcopy *.jpg U: /D/S/Y
exit


What does the following code block do?
d:
cd pictures
U:
cd Pictures

Why not replace 6 lines of code (the 4 I asked about plus the next
two) with a single fully qualified xcopy command?

Just curious.

--

Char Jackson
  #40  
Old April 26th 12, 11:51 PM posted to alt.windows7.general
Gene E. Bloch[_5_]
external usenet poster
 
Posts: 1,720
Default XCOPY Prompt

On 4/26/2012, Char Jackson posted:
On Thu, 26 Apr 2012 14:13:02 -0700, Bob Hatch
wrote:


And this is the batch file I use to copy pictures to my wife's laptop.

rem This is the program to Backup files to Marys Laptop computer.
cls
echo off
echo This program will Backup jpg pictures from Drive D to Marys Drive D.
rem
rem
rem
rem
echo To continue with the Backup Process press any key.


pause


I probably would have written the header like this:


cls
echo off
echo This program will backup jpg pics from Drive D to Marys Drive D.
pause



echo on

cls
d:
cd pictures

U:
cd Pictures

d:
xcopy *.jpg U: /D/S/Y
exit


What does the following code block do?
d:
cd pictures
U:
cd Pictures


Why not replace 6 lines of code (the 4 I asked about plus the next
two) with a single fully qualified xcopy command?


Just curious.


Those four lines replace the simpler use of qualified pathnames :-)

Oh, never mind, I suddenly realized what you're saying ;-)

Please stop this subtlety thing...

--
Gene E. Bloch (Stumbling Bloch)


  #41  
Old April 27th 12, 12:02 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default XCOPY Prompt

On Thu, 26 Apr 2012 15:51:10 -0700, Gene E. Bloch
wrote:

On 4/26/2012, Char Jackson posted:
On Thu, 26 Apr 2012 14:13:02 -0700, Bob Hatch
wrote:


And this is the batch file I use to copy pictures to my wife's laptop.

rem This is the program to Backup files to Marys Laptop computer.
cls
echo off
echo This program will Backup jpg pictures from Drive D to Marys Drive D.
rem
rem
rem
rem
echo To continue with the Backup Process press any key.


pause


I probably would have written the header like this:


cls
echo off
echo This program will backup jpg pics from Drive D to Marys Drive D.
pause



echo on

cls
d:
cd pictures

U:
cd Pictures

d:
xcopy *.jpg U: /D/S/Y
exit


What does the following code block do?
d:
cd pictures
U:
cd Pictures


Why not replace 6 lines of code (the 4 I asked about plus the next
two) with a single fully qualified xcopy command?


Just curious.


Those four lines replace the simpler use of qualified pathnames :-)


Yes.

Oh, never mind, I suddenly realized what you're saying ;-)


LOL Yes.

Please stop this subtlety thing...


Sorry, it wasn't intentional this time. It just happens sometimes.

--

Char Jackson
  #42  
Old April 27th 12, 12:24 AM posted to alt.windows7.general
Bob Hatch
external usenet poster
 
Posts: 206
Default XCOPY Prompt

On 4/26/2012 3:11 PM, Char Jackson wrote:
On Thu, 26 Apr 2012 14:13:02 -0700, Bob
wrote:

And this is the batch file I use to copy pictures to my wife's laptop.

rem This is the program to Backup files to Marys Laptop computer.
cls
echo off
echo This program will Backup jpg pictures from Drive D to Marys Drive D.
rem
rem
rem
rem
echo To continue with the Backup Process press any key.


pause


I probably would have written the header like this:

cls
echo off
echo This program will backup jpg pics from Drive D to Marys Drive D.
pause


echo on

cls
d:
cd pictures

U:
cd Pictures

d:
xcopy *.jpg U: /D/S/Y
exit


What does the following code block do?
d:
cd pictures
U:
cd Pictures

Why not replace 6 lines of code (the 4 I asked about plus the next
two) with a single fully qualified xcopy command?

Just curious.


I use the same batch file to back up things from friends computers. It's
easier to change the simple commands you asked about rather than type in
a longer file name for source and destination. At least it is for me. :-)

--
“There is no worse tyranny than to force a man
to pay for what he does not want merely because
you think it would be good for him.”
? Robert A. Heinlein
  #43  
Old April 27th 12, 03:28 AM posted to alt.windows7.general
choro
external usenet poster
 
Posts: 944
Default XCOPY Prompt

On 26/04/2012 03:27, Char Jackson wrote:
On Wed, 25 Apr 2012 22:44:55 +0100, wrote:

On 25/04/2012 15:48, Char Jackson wrote:
On Wed, 25 Apr 2012 12:36:04 +0100, wrote:

On 25/04/2012 02:39, Char Jackson wrote:
On Wed, 25 Apr 2012 00:45:33 +0100, wrote:

On 24/04/2012 17:51, Gene Wirchenko wrote:
On Mon, 23 Apr 2012 16:05:28 -0700, Bob
wrote:

On 4/23/2012 2:18 PM, Gene Wirchenko wrote:
Dear Win7ers:

I am working between two systems: an XP system and a 7 system. I
copy files back and forth on a USB stick. Some of the filenames are
long, and I have old utility software that is limited to the 8.3 file
format. I need short filenames, and I can not trust the the short
names generated by Windows will be consistent.

I created a batch file to make a short filename version:
del WFCNew.asp
xcopy WorkFunctionCodes_New.asp WFCNew.asp /v
^1^^^^^^^^^^^^^^^^^^^^^^^ ^2^^^^^^^^
1 is the source; 2 is the destination.

[snip]

I don't see a source and/or destination in your batch file.

If the file is already on the USB stick, why don't use just use ren or
rename?

I want a copy with a different name.

The simplest way is to copy and paste the file to another folder, rename
it there and then drag and drop it to the original folder. IF they are
in different drives then use the CUT& PASTE method.If you want both
copies of the file in the same folder that is...

Remember the motto, *Keep it simple*.

There's nothing "simple" about all of that rigmarole. I fail to see
the reason, and I fail to see why it would be any easier, to rename
files in one folder versus another. Just rename them where they lie.

But I thought he wanted *two* copies of the same file under different
names. Hence my suggestion... Got it?!

That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

Otherwise you can rename a file in loco as you suggest. But you cannot
rename a file in loco and still retain the old version with the old
original filename.

That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

I sound like a broken record, but these kinds of basic file operations
are, well, basic. They've been with us for over 30 years now.


No need for xcopy at all. Just open the file, *Save as...* and give it a
different filename -- may I suggest a dash or an underscore just before
the dot and the file extension e.g. Filename-.doc or Filename_.doc And
it's done! And you have 2 copies in the same folder.


There's no need to open any files. You seem to have a knack for coming
up with convoluted solutions. :-)



It is *YOU* who keeps coming up with convoluted solutions to the
simplest of procedures.

Anyway, this thing about having two copies of the same file in the same
folder but under different names is about the stupidest thing that I
have ever come across in the field of computing.
-- choro
  #44  
Old April 27th 12, 05:46 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default XCOPY Prompt

On Fri, 27 Apr 2012 03:28:22 +0100, choro wrote:

On 26/04/2012 03:27, Char Jackson wrote:
On Wed, 25 Apr 2012 22:44:55 +0100, wrote:

On 25/04/2012 15:48, Char Jackson wrote:
On Wed, 25 Apr 2012 12:36:04 +0100, wrote:

On 25/04/2012 02:39, Char Jackson wrote:
On Wed, 25 Apr 2012 00:45:33 +0100, wrote:

The simplest way is to copy and paste the file to another folder, rename
it there and then drag and drop it to the original folder. IF they are
in different drives then use the CUT& PASTE method.If you want both
copies of the file in the same folder that is...

Remember the motto, *Keep it simple*.

There's nothing "simple" about all of that rigmarole. I fail to see
the reason, and I fail to see why it would be any easier, to rename
files in one folder versus another. Just rename them where they lie.

But I thought he wanted *two* copies of the same file under different
names. Hence my suggestion... Got it?!

That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

Otherwise you can rename a file in loco as you suggest. But you cannot
rename a file in loco and still retain the old version with the old
original filename.

That's where xcopy (and copy, etc.) come in. They do exactly that, but
without requiring you to move files somewhere else first.

I sound like a broken record, but these kinds of basic file operations
are, well, basic. They've been with us for over 30 years now.

No need for xcopy at all. Just open the file, *Save as...* and give it a
different filename -- may I suggest a dash or an underscore just before
the dot and the file extension e.g. Filename-.doc or Filename_.doc And
it's done! And you have 2 copies in the same folder.


There's no need to open any files. You seem to have a knack for coming
up with convoluted solutions. :-)



It is *YOU* who keeps coming up with convoluted solutions to the
simplest of procedures.


Really? I'm pretty sure it was you who suggested moving the files to
another directory, renaming them there, and then moving the renamed
files back, versus simply renaming the files where they happened to
be. I'm also pretty sure it was you who suggested opening the files in
their native application and saving them with a new name. Both of
those solutions pale in comparison to simply renaming the files, in
this case via the xcopy command. Am I missing something?

Anyway, this thing about having two copies of the same file in the same
folder but under different names is about the stupidest thing that I
have ever come across in the field of computing.


People often label something stupid (or worse) until they understand
it. If you think about it a bit, I'm sure you'll see that it's
completely valid.

--

Char Jackson
  #45  
Old April 27th 12, 06:54 AM posted to alt.windows7.general
Steve Hayes[_2_]
external usenet poster
 
Posts: 1,089
Default XCOPY Prompt

On Thu, 26 Apr 2012 14:13:02 -0700, Bob Hatch wrote:

The file is on, what Windows calls, the desktop. Click on the batch file
and away we go. :-)


I don't put anything on the desktop except icons that are shortcuts to
programs elsewhere. The main reason is that I can't find the desktop to edit
the files.

I keep all my .BATs in C:\belfry, have C:\belfry in the path, so click on the
command line icon on the desktop, type the name of the batch file, and it
works.

DR-DOS had some useful commands like XDEL, which worked in Windows 98, but
doesn't seem to work in XP or later.


--
Steve Hayes from Tshwane, South Africa
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 02:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.