Topic "C drive Hidden files"

Author Message
tx4
[View user's profile]

Joined: 2013-10-04
Posts: 2
Location: Jacksonville Florida
I am using a c# .net service and calling out to winscp in a process and i am having hidden files written to the C drive for some reason and don't know how to get rid of them. I only noticed these when i showed hidden files. Is there an option command or something that i can use to prevent creating of files?

Version 4.3.9 build 1817 i only have been using this one version.
I am using SFTP protocol

In the GUI preferences under storage i have it pointed to an F drive location.

Here is my script from my code.

// Run hidden WinSCP process
using (Process winscp = new Process())
{
winscp.StartInfo.FileName = "winscp.com";
winscp.StartInfo.UseShellExecute = false;
winscp.StartInfo.RedirectStandardInput = true;
winscp.StartInfo.RedirectStandardOutput = true;
winscp.StartInfo.CreateNoWindow = true;

if (winscp.Start())
{
const string quote = "\"";

// Feed in the scripting commands
winscp.StandardInput.WriteLine("option batch abort");
winscp.StandardInput.WriteLine("option confirm off");
winscp.StandardInput.WriteLine("open moveFiles@moveFiles");
winscp.StandardInput.WriteLine("put -delete " + quote + file + quote + " " + quote + destfile + quote);
winscp.StandardInput.Close();


// Collect all output (not used in this example)
string output = winscp.StandardOutput.ReadToEnd();
WriteToErrorLog(output + ArchiveDirectory + DirectoryDateTimeStamp, ErrorLog, LogDirectory);

// Wait until WinSCP finishes
if (!winscp.Has_Exited)
winscp.WaitForExit();

}
else
{
WriteToErrorLog("Move to Linux Destination Error " + SourceDirectory, ErrorLog, LogDirectory);
}
// Success (0) or error?
if (winscp.ExitCode != 0)
{
WriteToErrorLog("Move to Linux Destination Error " + SourceDirectory, ErrorLog, LogDirectory);
sendEmailError("Move to Linux Destination Error ", LogDirectory);
}

}
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
I do not think WinSCP creates any hidden files. Can you show us an example?

Also to use WinSCP from C#, I recommend you to use WinSCP .NET assembly.
https://winscp.net/eng/docs/library

You should upgrade anyway.
_________________
Martin Prikryl
Guest




prikryl wrote:
I do not think WinSCP creates any hidden files. Can you show us an example?

Also to use WinSCP from C#, I recommend you to use WinSCP .NET assembly.
https://winscp.net/eng/docs/library

You should upgrade anyway.


Thank you for your reply. A bit more information for you, hopefully this will help. I am on a windows 2008 server and it has a SAN F drive attached to it. I am sending files from the F drive to a Linux box and After the successful copy of the file, i will get another copy on the C drive. Does WINSCP or the OS make copies of files while transmitting?
tx4
[View user's profile]

Joined: 2013-10-04
Posts: 2
Location: Jacksonville Florida
one other thing our shop uses SEP. Razz

I'm trying to rule out that WINSCP is the culprit of creating copies of the files i transmit.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
WinSCP does not make any copies, except rare situation when downloading files in GUI to an external application using drag&drop. What is definitely not your case.

Post a session log file, if you need to debug this further.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License