Command Line Delete Files in a Folder

Core FTP client questions and answers
Post Reply
SMcGraw
Posts: 1
Joined: Wed Mar 16, 2005 9:47 pm

Command Line Delete Files in a Folder

Post by SMcGraw »

Does anyone know how to delete all of the files in a folder via the command line? If so, what is the scripting for it?

Thank you
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

-del /remote folder/file.txt doesnt work or I used this switch not corectly

my syntax:

"c:\Program files\coreftp\coreftp.exe" -site mysiteprofile -del /remote folder/file.txt -s

This syntax copy file "file.txt" to default local directory specified in siteprofile (also last used local directory in CoreFTP GUI I mean)

I mean "-del filespec" is switch for use to delete SOURCE file (from CoreFTP help - command line)

Who know how to delete file(s) in remote dir or correct syntax???

Thanks
[/b]
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

I used 1.3 version
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Delete remote files

Post by Pucho »

This is exmaple:
"c:\Program files\coreftp\coreftp.exe" -site mysiteprofile -del "/remote folder/file.txt" -s
My real syntax is:
"c:\Program files\coreftp\coreftp.exe" -site pucho -del /upd_files/*.nvp -s

but nothing work also with quotation marks
"c:\Program files\coreftp\coreftp.exe" -site pucho -del "/upd_files/*.nvp" -s
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Delete remote files

Post by Pucho »

This is exmaple:
"c:\Program files\coreftp\coreftp.exe" -site mysiteprofile -del "/remote folder/file.txt" -s
My real syntax is:
"c:\Program files\coreftp\coreftp.exe" -site pucho -del /upd_files/*.nvp -s

but nothing work also with quotation marks
"c:\Program files\coreftp\coreftp.exe" -site pucho -del "/upd_files/*.nvp" -s
jeffd
Posts: 113
Joined: Thu May 06, 2004 6:12 am

Post by jeffd »

Which build are you using? Let me know and I'll give it a try.
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

1.3c
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

You want know my build...Sorry 1427

Syntax:
"c:\Program files\coreftp\coreftp.exe" -site Pucho -del "/skuska/*.txt" -s
delete all txt files in remote folder "skuska" but silent mode (-s) don't want close.
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

Solution of my previous problem (detele remote files) are quotation marks.
My new problem :) is correct termination of CoreFTP in silent mode...
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

Core FTP doesnt exiting correctly only in silent mode. In normal mode (GUI) files are copied corectly. May be this is the problem of uncorrect redrawing of silent mode window.
But:
While I copy files via command line ( "c:\program files\coreftp\coreftp.exe" -ON -site Pucho -u "%1*.txt" -p "/Skuska/") in Core FTP GUI I see this:

227 Entering Passive Mode (X,Y,Z,Q,R,T)
STOR abc.txt
Conect socket #A to X,Y,Z,Q, port R...
150 Opening BINARY mode data connection for abc.txt
226 Transfer complete.
abc.txt - 100 bytes transferred
MDTM 20050520142050 abc.txt
550 20050520142050 abc.txt: No such file or directory
Notification failed

X,Y,Z,Q is IP adresse of FTP
R,T are numbers about FTP (??? Probably)
A is number of socket
R is number of port
20050520142050 is probably date and time stamp of file abc.txt

What is MDTM and why I eliminate this:
550 20050520142050 abc.txt: No such file or directory
Notification failed

Thanks
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

OK thanks...And what is MDTM?
Pucho
Posts: 10
Joined: Fri Nov 25, 2005 11:19 pm

Post by Pucho »

OK. Thanks for all...
Post Reply