Deleting a file in Windows drive from Unix script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Deleting a file in Windows drive from Unix script
# 1  
Old 12-11-2008
MySQL 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!!Smilie
# 2  
Old 12-11-2008
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  
Old 12-11-2008
Incidentcally, you could also use FTP to remove files using the FTP "delete" command.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help to move .csv file from UNIX path to windows shared drive or c:\ drive

Hi Guys, Can any one help me on this. I need help to move .csv/.xls file from unix path to windows shared drive or c:\ drive? Regards, LKR (1 Reply)
Discussion started by: lakshmanraok117
1 Replies

2. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

Hi, I am new to this subject.....Can someone please help me out with the script... unix usernm "sdhftst" unix pwd "chsd13" windows usernm "dfghtst" windows pwd "chsd13" path..../xxx/xxxxx/xxxxxx/xxxxxxx please can u get me a script...its only one file to get ftp. Thanks... (2 Replies)
Discussion started by: himakiran9
2 Replies

3. UNIX for Advanced & Expert Users

How to Mount a Unix share drive on Windows

We are trying to mount a Unix share drive on a Windows 2003 server to avoid transfering files accross the network using sftp. I can see shared drives on the Solaris server using the "share" command. How can I mount the drives on my Windows server so that I can read them directly. Do I need... (2 Replies)
Discussion started by: rbdenham
2 Replies

4. UNIX for Dummies Questions & Answers

SFTP files from windows drive E: to unix

Hello friends, I was doing this test script which would take a file from my own E: drive to the unix server which i access from a putty. I tried sftp <osuser>@<ipaddress> but it didn't work. does the windows client have to be a server installation? i was trying on win xp from... (4 Replies)
Discussion started by: pranavagarwal
4 Replies

5. UNIX for Dummies Questions & Answers

Mount a windows drive on unix

Hi, I would like to be able to mount windows xp to a unix system, so that I can pull data from windows machine for backup and store it on the unix server. Does anyone know how I can go about mounting the windows drive in unix. Thanks, Eric (4 Replies)
Discussion started by: ejbrever
4 Replies

6. UNIX for Dummies Questions & Answers

Map Drive from UNIX Server to Windows Clients

hi all ;; I have a Tru64 UNIX machine , first i want my employees ( windows clients) to see specific directory on unix , and how can i put a unix command in a visual basic code to copy the contents of that directory to drive c in the client side who request that by clicking a push button. ... (3 Replies)
Discussion started by: kafaween
3 Replies

7. UNIX for Advanced & Expert Users

format unix hard drive on windows xp

Hello, How is it possible to copy the partition of hard drive that have unix on it (it's a scsi hard drive of an Irix (SGI)), under windows xp - what I did till now is to connect the drive to the my pc (windows xp installed) with a scsi adapter and the program partition magic can't recognize the... (2 Replies)
Discussion started by: moyalt
2 Replies

8. UNIX for Advanced & Expert Users

Formatting hard drive from Unix to Windows

Can a hard drive be formatted from unix server to windows 2000 professional? (4 Replies)
Discussion started by: howarddtp
4 Replies

9. UNIX for Dummies Questions & Answers

seperate hard drive for unix & x windows

thanks for your help, i didnt realise you could download the operating system from sun.com:D Ive just had a new hard drive installed 20 GIG for unix and x windows. How can i connect this hard drive for unix and x windows only? and are there any helpful tutorials for starters?? Many thanks (4 Replies)
Discussion started by: jeffersno1
4 Replies
Login or Register to Ask a Question