Error Copying The File Exists
Topic smondal Members Profile Send Private Message Find Members Posts Add to Buddy List Newbie Joined: 04 August 2011 Location: India Status: Offline Points: 2 Post Options Post Reply Quotesmondal Report Post Thanks(0) QuoteReply Topic: Psexec Error copying file to remote systemPosted: 04 August 2011 at 8:43am Hello,I'm trying to run an agent on remote machines that will return some data back on the local. I'm using the following command:psexec.exe -accepteula \\MyIP -c -d -s -u mydomain\administrator -p "password" temp\agent.exe param1 param2 etc.And the above works fine in most of the cases. But for some machines I get the following error:PsExec v1.94 - Execute processes remotelyCopyright (C) 2001-2008 Mark RussinovichSysinternals - www.sysinternals.com\\MyIP:Error copying temp\agent.exe to remote system:The file exists.I googled for this and also search in this forum, but not able to find the reason why PsExec returns this error or any specific error code for this.Please help. Josia Members Profile Send Private Message Find Members Posts Add to Buddy List Newbie Joined: 06 November 2015 Status: Offline Points: 1 Post Options Post Reply QuoteJosia Report Post Thanks(0) QuoteReply Posted: 06 November 2015 at 11:21am Hi,psexec help says : -f copy the specified program even if the file already exists on the remote systempsexec.exe -accepteula \\MyIP -c -d -s -u -f mydomain\administrator -p "password" temp\agent.exe param1 param2 etc JS Post Reply Tweet Forum Jump -- Select Forum -- Autoruns BgInfo Disk2vhd Miscellaneous Utilities Process Explorer Process Monitor PsTools RootkitRevealer Usage RootkitRevealer Logs Utilities Suggestions Internals Development Troubleshooting Malware Site Bugs Site Suggestions Forum Permissions You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot delete your posts in this forumYou cannot edit your posts in this forumYou cannot create polls in this forumYou cannot vote in polls in this forum Forum Software by Web Wiz Forums version 11.06Copyright ©2001-2016 Web Wiz Ltd.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://forum.sysinternals.com/psexec-error-copying-file-to-remote-system_topic26320.html “The file exists” error on vb.net unzip using shell 32 up vote 0 down vote favorite Help please... I'm having error "The file exists" when i try to unzip a folder. At first, the code works fine but then i encountered "The file exists" Here is my Code: Private Sub unzip(ByVal Source As String, ByVal Output As String) Dim m_Sc As New Shell32.Shell If http://stackoverflow.com/questions/15492342/the-file-exists-error-on-vb-net-unzip-using-shell-32 Directory.Exists(Output) Then Directory.Delete(Output) End If Dim m_Output As Shell32.Folder = m_Sc.NameSpace(Output) Dim m_Source As Shell32.Folder = m_Sc.NameSpace(Source) m_Output.CopyHere(m_Source.Items, 4) End Sub I'm using vb.net(3.5) 2008 Thanks in advance vb.net share|improve this question asked Mar 19 '13 at 5:49 Winston Madiano 60110 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote I Found the answer of my problem(thanks to stackoverflow) Problem: When i repeatedly unzip the same file, it creates a copy of the extracted file on the temporary directory. If the temp directory has reached its limit(99 copies) then it a causes the error "The file exists". temp directory location: "C:\Documents and Settings(your user account)\Local Settings\Temp". You can access them in .net using (My.Computer.FileSystem.SpecialDirectories.Temp) or (Environment.GetEnvironmentVariable("TEMP")). Solution: Before unziping(extracting) a file, i first delete the previous copy on the temp folder.. Here is my Code for clearing the temporary directory: Sub CleanUpTemporaryFiles() Dim m_StrTemporaryDirectory As String = "" 'Get the Temporary folder directory m_StrTemporaryDirectory = Environment.GetEnvironmentVariable("TEMP") If Directory.Exists(m_StrTemporaryDirectory & _ "\Temporary Directory 1 for " & _ m_ApplicationName & ".zip\") Then Dim directory As String = m_StrTemporaryDirectory & _ "\Temporary Directory 1
Generators References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Context options and parameters Supported Protocols and Wrappers Security Introduction General considerations Installed as CGI binary Installed as an Apache module Session Security Filesystem Security Database Security Error Reporting http://php.net/manual/en/function.copy.php Using Register Globals User Submitted Data Magic Quotes Hiding PHP Keeping Current Features HTTP authentication with PHP Cookies Sessions Dealing with XForms Handling file uploads Using remote files Connection handling Persistent Database Connections Safe https://msdn.microsoft.com/en-us/library/system.io.file.exists(v=vs.110).aspx Mode Command line usage Garbage Collection DTrace Dynamic Tracing Function Reference Affecting PHP's Behaviour Audio Formats Manipulation Authentication Services Command Line Specific Extensions Compression and Archive Extensions Credit Card Processing Cryptography Extensions Database Extensions error copying Date and Time Related Extensions File System Related Extensions Human Language and Character Encoding Support Image Processing and Generation Mail Related Extensions Mathematical Extensions Non-Text MIME Output Process Control Extensions Other Basic Extensions Other Services Search Engine Extensions Server Specific Extensions Session Extensions Text Processing Variable and Type Related Extensions Web Services Windows Only Extensions XML Manipulation Keyboard Shortcuts? This help j Next menu item k Previous menu error copying the item g p Previous man page g n Next man page G Scroll to bottom g g Scroll to top g h Goto homepage g s Goto search(current page) / Focus search box delete » « clearstatcache PHP Manual Function Reference File System Related Extensions Filesystem Filesystem Functions Change language: English Brazilian Portuguese Chinese (Simplified) French German Japanese Korean Romanian Russian Spanish Turkish Other Edit Report a Bug copy (PHP 4, PHP 5, PHP 7)copy — Copies file Description bool copy ( string $source , string $dest [, resource $context ] ) Makes a copy of the file source to dest. If you wish to move a file, use the rename() function. Parameters source Path to the source file. dest The destination path. If dest is a URL, the copy operation may fail if the wrapper does not support overwriting of existing files. Warning If the destination file already exists, it will be overwritten. context A valid context resource created with stream_context_create(). Return Values Returns TRUE on success or FALSE on failure. Changelog Version Description 5.3.4 Changed the context parameter to actually have an effect. Previously, any context was ignored. 5.3.0 Added context support. 4.3.0 Both source and dest may now b
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. System.IO File Class File Methods File Methods Exists Method Exists Method Exists Method AppendAllLines Method AppendAllText Method AppendText Method Copy Method Create Method CreateText Method Decrypt Method Delete Method Encrypt Method Exists Method GetAccessControl Method GetAttributes Method GetCreationTime Method GetCreationTimeUtc Method GetLastAccessTime Method GetLastAccessTimeUtc Method GetLastWriteTime Method GetLastWriteTimeUtc Method Move Method Open Method OpenRead Method OpenText Method OpenWrite Method ReadAllBytes Method ReadAllLines Method ReadAllText Method ReadLines Method Replace Method SetAccessControl Method SetAttributes Method SetCreationTime Method SetCreationTimeUtc Method SetLastAccessTime Method SetLastAccessTimeUtc Method SetLastWriteTime Method SetLastWriteTimeUtc Method WriteAllBytes Method WriteAllLines Method WriteAllText Method TOC Collapse the table of content Expand the table of content This documentation is archived and is not being maintained. This documentation is archived and is not being maintained. File.Exists Method (String) .NET Framework (current version) Other Versions Visual Studio 2010 .NET Framework 4 Silverlight Visual Studio 2008 .NET Framework 3.5 .NET Framework 3.0 .NET Framework 2.0 .NET Framework 1.1 Determines whether the specified file exists.Namespace: System.IOAssembly: mscorlib (in mscorlib.dll)Syntax C#C++F#VB Copy public static bool Exists( string path ) Parameterspath Type: System.StringThe file to check. Return Value Type: System.Booleantrue if the caller has the required permissions and path contains the name of an existing file; otherwise, false. This method also returns false if path is null, an invalid path, or a zero-length string. If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of path.RemarksThe Exists method should not be used for path validation, this method merely checks if the file specified in path exists. Passing an invalid path to Exists returns false. To check whether the path contains any invalid characters, you can call the GetInvalidPathChars method to retrieve the characters that are