Renaming files

M

Metspitzer

I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have files
called Copy of blahblah.dat

I would like to delete the dat files and rename copys of blahblahs.dat
to blahblah.dat
 
B

Barry Schwarz

I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have files
called Copy of blahblah.dat

I would like to delete the dat files and rename copys of blahblahs.dat
to blahblah.dat

Do you want to use Windows Explorer?
Did you try dragging them while holding down the control key?
Did you try copy and paste from the Edit menu or context menu?
Did you try rename from the File menu or context menu?

Do you want to use DOS commands?
Did you try the copy, rename, and delete commands?

Alternately, since you want to end up with only one copy of the files
with the original names, why not simply move them once and be done
with it?
 
N

Nil

I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have
files called Copy of blahblah.dat

I would like to delete the dat files and rename copys of
blahblahs.dat to blahblah.dat

OK, thanks for sharing your hopes and wishes.

Is there a question in the works?
 
P

Paul in Houston TX

Metspitzer said:
I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have files
called Copy of blahblah.dat

I would like to delete the dat files and rename copys of blahblahs.dat
to blahblah.dat

I am not understanding what you are wanting to do.
If you're going to copy the files then name the copies the
same as the original, then why bother to copy them in the
first place? Just use the originals and forget about copying.
 
V

VanguardLH

Metspitzer said:
I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have files
called Copy of blahblah.dat

I would like to delete the dat files and rename copys of blahblahs.dat
to blahblah.dat

You're getting lazy in your posts. You're posting like we are there
looking over your shoulder to see at what you are pointing. Review your
post. Do you think it asks anything of others? Do you think it makes
sense to others?

What .dat files?
What type of database files?
What application is used to access those database files?

What is the point of copying the files and then using them as the
originals versus just using the originals?

What was your intent that you didn't divulge here?
 
M

Metspitzer

Do you want to use Windows Explorer?
Did you try dragging them while holding down the control key?
Did you try copy and paste from the Edit menu or context menu?
Did you try rename from the File menu or context menu?

Do you want to use DOS commands?
Did you try the copy, rename, and delete commands?

Alternately, since you want to end up with only one copy of the files
with the original names, why not simply move them once and be done
with it?

Just make a sub directory and copy them back? That would be much
easier.

Thanks
 
M

Metspitzer

I am not understanding what you are wanting to do.
If you're going to copy the files then name the copies the
same as the original, then why bother to copy them in the
first place? Just use the originals and forget about copying.

I have a program that looses the dat files if the computer crashes.
 
V

VanguardLH

Metspitzer said:
I have a program that looses the dat files if the computer crashes.

So why not simple schedule a batch file with a 'copy' command using
Task Scheduler to save a backup at a convenient location. In fact, you
could use the .bat file in your program's shortcut so that it copies any
..dat files to save backups before you load the program (and could do a
copy after you exit the program, too). As for doing periodic backups
when the program is running, well, yeah, you could use the batch script
but you'll have to remember to run it occassionally which means you'll
forget to run it. The program itself should be making periodic saves of
its data.

Since the backup copies of the .dat files are in a different location,
even if just a subfolder of their current location, you don't need to
waste time renaming folder. Just copy the files. When you want to
restore them from backups, just do another copy atop the existing but
now corrupt database files (or whatever "looses" means).
 
P

Paul

Metspitzer said:
I have a program that looses the dat files if the computer crashes.

Do you have a Windows PC that has a file share on it ?

Could you store the .dat files over there ?

Maybe then, if your PC crashed, they'd still be there.

*******

Your other option, is to run Photorec or Recuva, right
after the crash. To do that, you could

1) Move the C: drive to another PC. This is to prevent
any writes to it, as a "plain data drive".

2) Use a file scavenger.

3) Move the disk back when you're done.

If you boot the damaged disk, the CHKDSK run might
remove the .dat files. That's the only reason I'm suggesting
moving the disk, to improve the odds that no writes are done
to the disk before the scavenger gets to run. You need to
use a scavenger that knows that particular .dat format.
Or a scavenger that knows how to find everything.

*******

If your PC has a second hard drive inside, the files might
survive better, if stored on the second hard drive, rather
than on C:. The recovery might work better there (no writes
to the disk). Any writes to a disk, endanger the sectors
the missing files might be stored on.

*******

You could also just fix the reason the PC is crashing :)

Paul
 
M

Metspitzer

So why not simple schedule a batch file with a 'copy' command using
Task Scheduler to save a backup at a convenient location. In fact, you
could use the .bat file in your program's shortcut so that it copies any
.dat files to save backups before you load the program (and could do a
copy after you exit the program, too). As for doing periodic backups
when the program is running, well, yeah, you could use the batch script
but you'll have to remember to run it occassionally which means you'll
forget to run it. The program itself should be making periodic saves of
its data.

Since the backup copies of the .dat files are in a different location,
even if just a subfolder of their current location, you don't need to
waste time renaming folder. Just copy the files. When you want to
restore them from backups, just do another copy atop the existing but
now corrupt database files (or whatever "looses" means).

Good idea

Thanks
 
M

Metspitzer

You're getting lazy in your posts. You're posting like we are there
looking over your shoulder to see at what you are pointing. Review your
post. Do you think it asks anything of others? Do you think it makes
sense to others?

What .dat files?
What type of database files?
What application is used to access those database files?

What is the point of copying the files and then using them as the
originals versus just using the originals?

What was your intent that you didn't divulge here?

Yeah. I am very lazy at posting. Sorry
 
M

Metspitzer

Do you have a Windows PC that has a file share on it ?

Could you store the .dat files over there ?

Maybe then, if your PC crashed, they'd still be there.

*******

Your other option, is to run Photorec or Recuva, right
after the crash. To do that, you could

1) Move the C: drive to another PC. This is to prevent
any writes to it, as a "plain data drive".

2) Use a file scavenger.

3) Move the disk back when you're done.

If you boot the damaged disk, the CHKDSK run might
remove the .dat files. That's the only reason I'm suggesting
moving the disk, to improve the odds that no writes are done
to the disk before the scavenger gets to run. You need to
use a scavenger that knows that particular .dat format.
Or a scavenger that knows how to find everything.

*******

If your PC has a second hard drive inside, the files might
survive better, if stored on the second hard drive, rather
than on C:. The recovery might work better there (no writes
to the disk). Any writes to a disk, endanger the sectors
the missing files might be stored on.

*******

You could also just fix the reason the PC is crashing :)

Paul


The last crash was when the power stayed off longer than the UPS, but
other times, it is because I keep the computer up too long and have to
reboot without shutting down properly.

It doesn't happen very often, but enough to make it frustrating to set
up the program again.

Thanks
 
P

Paul

Metspitzer said:
The last crash was when the power stayed off longer than the UPS, but
other times, it is because I keep the computer up too long and have to
reboot without shutting down properly.

It doesn't happen very often, but enough to make it frustrating to set
up the program again.

Thanks

If your UPS has a serial or USB interface on it, you can have
the UPS signal to a single PC, to shut down on command.

Say my UPS has a 5 minute battery life. My UPS has a switch on it
that says "send a shutdown command at the 2 minute mark". Then,
when the AC goes off, the computer runs on battery for two minutes.
If I'm present, I can shut it down within those two minutes.

But, say I'm not in the house. Or asleep. After two minutes have
elapsed, the UPS sends a signal over the cable that is connected
to the PC. The PC has a "UPS handler" in it, that when it sees
the shutdown command, it closes all processes (throwing away that
Microsoft Word file you were working on), then does a shutdown
of the operating system. That means, the file system will be
"clean" on the next startup.

And since that happens at the 2 minute mark, there is still 3 minutes
of juice left in the UPS. So it doesn't "run out of juice and
corrupt the file system". That's the difference.

Since my "old" UPS uses RS232 serial, and my new motherboard
has no serial, I had to use a USB to RS232 serial adapter, to
connect the whole thing up.

Modern UPS designs, have more things you can do from the PC end.
Like reading out any internal parameters the UPS might have.
Current line voltage. Percentage of full load. That sort of
junk. But all I need in this case, is that "shutdown" command.

http://nam-en.apc.com/app/answers/d...shutdown-support-in-windows-2000,-xp,-or-2003

If the product and model number are not mentioned in the panel,
then you'd try the CD that came in the UPS box. As it may have
software to do the same job.

Paul
 
M

Metspitzer

If your UPS has a serial or USB interface on it, you can have
the UPS signal to a single PC, to shut down on command.

Say my UPS has a 5 minute battery life. My UPS has a switch on it
that says "send a shutdown command at the 2 minute mark". Then,
when the AC goes off, the computer runs on battery for two minutes.
If I'm present, I can shut it down within those two minutes.

But, say I'm not in the house. Or asleep. After two minutes have
elapsed, the UPS sends a signal over the cable that is connected
to the PC. The PC has a "UPS handler" in it, that when it sees
the shutdown command, it closes all processes (throwing away that
Microsoft Word file you were working on), then does a shutdown
of the operating system. That means, the file system will be
"clean" on the next startup.

And since that happens at the 2 minute mark, there is still 3 minutes
of juice left in the UPS. So it doesn't "run out of juice and
corrupt the file system". That's the difference.

Since my "old" UPS uses RS232 serial, and my new motherboard
has no serial, I had to use a USB to RS232 serial adapter, to
connect the whole thing up.

Modern UPS designs, have more things you can do from the PC end.
Like reading out any internal parameters the UPS might have.
Current line voltage. Percentage of full load. That sort of
junk. But all I need in this case, is that "shutdown" command.

http://nam-en.apc.com/app/answers/d...shutdown-support-in-windows-2000,-xp,-or-2003

If the product and model number are not mentioned in the panel,
then you'd try the CD that came in the UPS box. As it may have
software to do the same job.

Paul

I would have done that except for the PC I am using is a bottom of the
barrel hand me down. It only has 2 USB ports. 1 for the mouse and 1
for the printer.

I do have a USB expansion card I am not using. I may just add it.

Thanks

BTW I live very close to the power sub station. I can't remember the
last time my power was down for more than 30 min. Not counting
yesterday.

When the power went down, I turned everything off except for the
tower, modem, router and cordless phone. The UPS lasted around 45
min. We were watching The Big Bang Theory on the laptop while waiting
for the power to come back on.

BTW again..........Before the first episode of the BBT was done, the
power tried to come back on. I am guessing that they were set to turn
the power back on, but the line had more than one fault. I have a
friend that is a lineman for the local power company. I plan on
asking him what happened next time I see him. We had very heavy winds
here in GA.
 
P

Paul

Metspitzer said:
BTW again..........Before the first episode of the BBT was done, the
power tried to come back on. I am guessing that they were set to turn
the power back on, but the line had more than one fault. I have a
friend that is a lineman for the local power company. I plan on
asking him what happened next time I see him. We had very heavy winds
here in GA.

They're usually very careful about that. Never in a
rush to re-energize the line, until it's inspected.
Maybe it's dangerous or something. :)

Paul
 
M

Metspitzer

If your UPS has a serial or USB interface on it, you can have
the UPS signal to a single PC, to shut down on command.

Say my UPS has a 5 minute battery life. My UPS has a switch on it
that says "send a shutdown command at the 2 minute mark". Then,
when the AC goes off, the computer runs on battery for two minutes.
If I'm present, I can shut it down within those two minutes.

USP monitor up and running. It reports 171W.

That is with 2 monitors. I wish I could get my alarm clock over here.
I guess I will be digging out a 25' drop cord for that. :)

A graph with wattage usage would be useful.

Thanks
 
Y

Yousuf Khan

I have some files that end with dat. 5 in total.
What I would like to do is make a copy of them so I then have files
called Copy of blahblah.dat

I would like to delete the dat files and rename copys of blahblahs.dat
to blahblah.dat

Are you asking for a mass renaming utility? If so, then check out the
following utility. It's quite powerful, and flexible. There might be an
initial learning curve, but it's nothing too big.

Scarabée Software: Siren
http://www.scarabee-software.net/en/siren.html

Yousuf Khan
 
M

Metspitzer

Are you asking for a mass renaming utility? If so, then check out the
following utility. It's quite powerful, and flexible. There might be an
initial learning curve, but it's nothing too big.

Scarabée Software: Siren
http://www.scarabee-software.net/en/siren.html

Yousuf Khan

Copying the files to another directory until I need them is a much
easier way of doing what I was trying to accomplish.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top