Logging folder keeps reverting to default

Advertisement

Guest

Logging folder keeps reverting to default

Under the Tools / Preferences / Logging: I want to let the Log Path = %Temp_Dir%\WinSCP Logs\!y-!M-!D_!S.log. This folder layout works if I replace the %Temp_Dir% with the actual drive and folder.

I run WinSCP on two different computers and my ini file is located in my OneDrive folder shared between both PCs. I need to have a different Temp folder on each machine. I have the %Temp_Dir% variable set on both PCs, but when I run a command line batch script, it cannot find this variable, and reverts it to the one in the default.

I assume I am doing something wrong, but cannot figure out what.

Thanks.

Reply with quote

Advertisement

MWynia
Joined:
Posts:
2
Location:
Michigan

Re: Logging folder keeps reverting to default

martin wrote:

How do you run the "command line batch script"? Show us log file.

I have a batch script that is scheduled to run on a PC. It uses the command line:
winscp.com /script=E:\OneDrive\WinSCP\Error_Checking\Error_Check_Open.txt /parameter %FTP_EDI% /ini=E:\OneDrive\WinSCP\WinSCP.ini

The connection works fine if I have my setting like the file c_temp.gif.

When I change the logging in the INI to be %Temp_Dir% (Temp_Var.gif) it throws the error to the screen, not any logs. Please see error_with_temp.gif

It then changes the logging back to default

By the way, the guest who posted this question originally was me, I forgot to sign in first.

Description: Error Screen Shot

error_with_temp_var.gif

Description: Configuration with my actual temp folder spelled out.

c_temp.gif

Description: Shown with my variable setting.

Temp_Var.gif

Reply with quote

martin
Site Admin
martin avatar

Re: Logging folder keeps reverting to default

What if you run the command-line manually, instead of in Scheduler?
Are you sure the variable %Temp_Dir% is visible by the local account that runs the Scheduler task?

Reply with quote

MWynia
Joined:
Posts:
2
Location:
Michigan

Re: Logging folder keeps reverting to default

martin wrote:

What if you run the command-line manually, instead of in Scheduler?
Are you sure the variable %Temp_Dir% is visible by the local account that runs the Scheduler task?

In doing further testing with your direction, I found that the variable is not available when the job runs via the scheduler (Z-Cron). It works when run as my user, but not when run as a service. I'll have to dig in and figure out how to make this work.

At this time, it is not WinSCP that is causing the issue.

Thanks for all your help.

Reply with quote

Advertisement

You can post new topics in this forum