"Cannot find file or one of its components"

H

Hans Näslund

I am trying to write a batch file for my backup, renaming/deleting earlier
backup files and then starting the backup programme.

When the batch file tries to start the backup programme, I get the error
message "Cannot find file <file path> (or one of its components). Check to
ensure the path and filename are correct and that all required libraries are
available."

According to Microsoft support article 166389, the cause of this error
message is that the Use DDE setting is enabled, or the information in that
section is incorrect. So the solution should be to uncheck the Use DDE check
box.

However, that check box was never checked in my case. Also, this support
article applies only to Win98 and WinNT, and I am using Win2000.

Does anybody have a clue?

The strange thing is that when I first used the batch file, it worked just
fine, but later this error message keeps popping up.
 
P

Pegasus \(MVP\)

Hans Näslund said:
I am trying to write a batch file for my backup, renaming/deleting earlier
backup files and then starting the backup programme.

When the batch file tries to start the backup programme, I get the error
message "Cannot find file <file path> (or one of its components). Check to
ensure the path and filename are correct and that all required libraries are
available."

According to Microsoft support article 166389, the cause of this error
message is that the Use DDE setting is enabled, or the information in that
section is incorrect. So the solution should be to uncheck the Use DDE check
box.

However, that check box was never checked in my case. Also, this support
article applies only to Win98 and WinNT, and I am using Win2000.

Does anybody have a clue?

The strange thing is that when I first used the batch file, it worked just
fine, but later this error message keeps popping up.


- What backup program are you referring to?
- What exactly is the command line you use to invoke it?
- What happens when you run the backup program outside the batch file?
 
H

Hans Näslund

The batch file looks like this:

@echo off
if exist E:\Daglig_backup-tidigare.bac del E:\Daglig_backup-tidigare.bac
if exist E:\Daglig_backup-tidigare.b02 del E:\Daglig_backup-tidigare.b02
if exist E:\Daglig_backup-tidigare.b03 del E:\Daglig_backup-tidigare.b03
if exist E:\Daglig_backup.bac ren E:\Daglig_backup.bac
Daglig_backup-tidigare.bac
if exist E:\Daglig_backup.b02 ren E:\Daglig_backup.b02
Daglig_backup-tidigare.b02
if exist E:\Daglig_backup.b03 ren E:\Daglig_backup.b03
Daglig_backup-tidigare.b03
START C:\Program\Backup Plus\Backup Sets\Daglig_backup.bps
EXIT

- but the same error message is shown also if I reduce the batch file to
this command line:

START C:\Program\Backup Plus\Backup Sets\Daglig_backup.bps

As you can see, the backup programme is Backup Plus. And runs perfectly OK
if started alone, or as a scheduled task.

Hans
 
P

Pegasus \(MVP\)

The command line

START C:\Program\Backup Plus\Backup Sets\Daglig_backup.bps

has a few problems.
1. The first argument for the "Start" command is the title of
the process. You don't seem to have a title.
2. Files and folders with embedded spaces must be surrounded by
double quotes. You don't have any.
3. The argument at the end appears to have embedded spaces too.
Surround it with double quotes!

What actually is your executable file? Perhaps your command line
should look like this:

START "Min daglig backup" "C:\Program\Backup Plus\Backup.exe"
"c:\Sets\Daglig_backup.bps"

(this is one single long line!)
 
H

Hans Näslund

Thank you! The quotes did the trick.

The command line to start the backup now looks like this:

START "C:\Program\Backup Plus\BackPlus.exe" "C:\Program\Backup Plus\Backup
Sets\Daglig_backup.bps"

No title for the process was necessary.

Regards,
Hans
 

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