# problem with /script=

biscotti
Joined:
Posts:
1

## problem with /script=

Hi there,

I'm trying to get the /script option to work with my stored session and it keeps giving me a:

Cannot open file: <my_script_name>.txt

It all works when I issue the commands that I want manually but for some reason when I reference a script file I get the error above.

Any help would greatly be appreciated. Thanks.

Scott

martin
Joined:
Posts:
28,094
Location:
Prague, Czechia

## Re: problem with /script=

Do you use full path?
_________________
Martin Prikryl

Guest
Yea, when I do that it truncates the path in the same error message to:

Cannot open file: c:\Program

The full path is supposed to be: c:\Program Files\Winscp3\config.txt

When I put the path within quotes it will error the same, but with the full path of:

Cannot open file: c:\Program Files\Winscp3\config.txt

-Scott

martin
Joined:
Posts:
28,094
Location:
Prague, Czechia
Sorry, I have no idea what's wrong. It works for me. Have you tried using short path "c:\progra~1\winscp3\config.txt"?
_________________
Martin Prikryl

Guest
No I hadn't tried that. I ended up going a different route and scripting a .bat file and hardcoding all the parameters and commands. Unfortunately, now I'm having a problem where my command that brings all the files in a directory over, doesn't bring over .doc files. Crud.

Scott

colfer
Guest
Quote any file names that contain spaces, I would say.

You can post new topics in this forum