The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SFTP files from windows drive E: to unix pranavagarwal UNIX for Dummies Questions & Answers 4 11-26-2007 09:17 AM
Mount a windows drive on unix ejbrever UNIX for Dummies Questions & Answers 4 10-11-2006 06:35 AM
format unix hard drive on windows xp moyalt UNIX for Advanced & Expert Users 2 05-11-2006 07:49 PM
Formatting hard drive from Unix to Windows howarddtp UNIX for Advanced & Expert Users 4 07-03-2005 04:32 PM
seperate hard drive for unix & x windows jeffersno1 UNIX for Dummies Questions & Answers 4 09-04-2001 12:28 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-11-2008
anilvaranasi_02 anilvaranasi_02 is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 1
Thumbs up Deleting a file in Windows drive from Unix script

Objective
*******
I was trying to develop a script that moves files from one folder to another in Windows drive from a Unix script. I got ftp account created for those windows folders.

I know that for moving a file from Unix server to Windows server we use scp command, but is there a command to delete a file in Windows server via Unix script..

Please help!!
  #2 (permalink)  
Old 12-11-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
If you are ableto scp from Unix to Windows that suggests that there is an SSH daemon running on the windows system, in which case it may support running remote commands through SSH, e.g.


Code:
ssh windowsserver 'del "c:\temp\somefile"'

But it depends on what kind of SSH daemon your Windows server is running, and what kind of commands it supports (i.e. command prompt commands, or perhaps if it is running Cygwin, unix-like commands).
  #3 (permalink)  
Old 12-11-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Incidentcally, you could also use FTP to remove files using the FTP "delete" command.
Closed Thread

Bookmarks

Tags
unix commands

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0