• Please review our updated Terms and Rules here
  • Exhibitor application for VCF West 2022 is now open! If you are interested in exhibiting, please fill out the form here.

FTP and long file names

josephdaniel

Experienced Member
Joined
Jul 3, 2012
Messages
317
Location
Florence, Texas, United States
Ok, I have a FTP server setup on my 5160 and I can ftp into it and grab individual files if I go into the directory. Say there was a regular directory but it had something like 35 files inside with why cant I just type mget what ever directory and it get the contents or even copy the entire directory? It really makes moving large directory's a absolute pain because I have to type in each file name... Am I missing some sort of command for this or what because I need to backup my ENTIRE HDD with over 5MB of stuff on it and it's simply not doable with how I am doing it...
 

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
39,045
Location
Pacific Northwest, USA
It depends on the client as well as the server. For example, I can use NCFTP and GET -R * which will pick up an entire directory and all sub-directories.
 

josephdaniel

Experienced Member
Joined
Jul 3, 2012
Messages
317
Location
Florence, Texas, United States
My server is the FTP server that came default with Mtcp. As for a client, I use the FTP clinet in the command line of Windows 7. I tried those that you just posted and NCFTP doesn't work and when I do GET -r I get this "550 No file ops supported in root directory"
 

ibmapc

Veteran Member
Joined
Apr 5, 2010
Messages
1,029
Location
Albany, OR USA
Try FileZilla FTP Client on your Windows 7 machine. It's free to download and has worked well for me on my XP machine moving files, directories or entire hard drive volumes to and from my 5155 which runs mTCP FTP Server. mTCP Rules!!!
 

josephdaniel

Experienced Member
Joined
Jul 3, 2012
Messages
317
Location
Florence, Texas, United States
Try FileZilla FTP Client on your Windows 7 machine. It's free to download and has worked well for me on my XP machine moving files, directories or entire hard drive volumes to and from my 5155 which runs mTCP FTP Server. mTCP Rules!!!

Agreed mtcp is pretty awesome!
I tried filezilla client yesturday it was able to access the disk but I couldn't get it to download the files for some reason? Sometimes the command prompt is easyer for me in windows…
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,240
Ok, I have a FTP server setup on my 5160 and I can ftp into it and grab individual files if I go into the directory. Say there was a regular directory but it had something like 35 files inside with why cant I just type mget what ever directory and it get the contents or even copy the entire directory? It really makes moving large directory's a absolute pain because I have to type in each file name... Am I missing some sort of command for this or what because I need to backup my ENTIRE HDD with over 5MB of stuff on it and it's simply not doable with how I am doing it...

The answer is easy - your FTP server is running on DOS. Therefore, it is using DOS filename rules.

Instead of using mget * you should be using mget *.*. Remember, in DOS a filespec that is just "*" means all files without an extension. If you want all files use "*.*".

Why does the title of this thread have "long file names" in it?
 

josephdaniel

Experienced Member
Joined
Jul 3, 2012
Messages
317
Location
Florence, Texas, United States
Ok, thanks. Also is there a command I can use once I am in the root directory of drive c? That will basically clone the drive without me having to go into each subdirectorie? One of the reasons I wast to be able to copy the whole thing is because I'm going to make a simple script that I can run from my windows computer and it will automatically backup the drive
As for the title name I don't know why I named it that I was thinking of something else when I was writing this...
 

AnyoneYoubet

Member
Joined
Jun 9, 2013
Messages
34
Location
Canton, Pennsylvania USA
just a shot in the dark here.
I don't think you can use the FTP to back up a hard drive.
In my head the FTP is designed to transfer files that are on the server; " the shared files ", and not the entire os system.
only the shared files can be transferred.
the server software you are using mtcp
When an FTP client and server wish to exchange data they will open a new
socket connection that will be used for that one data transfer. A data
transfer is a directory listing, a file send or a file receive. (Yes,
even a directory listing requires a new socket connection.) After the
data transfer is done the new socket is closed, leaving only the original
control connection. Data connections are not used for more than one data
transfer.
A good read of the doc explains more.
Also:
dos is still dos, so long file names ; " allowed up to eight then the . then up to three for the extension.
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,240
Ok, thanks. Also is there a command I can use once I am in the root directory of drive c? That will basically clone the drive without me having to go into each subdirectorie? One of the reasons I wast to be able to copy the whole thing is because I'm going to make a simple script that I can run from my windows computer and it will automatically backup the drive
As for the title name I don't know why I named it that I was thinking of something else when I was writing this...

Find an FTP client that can do that ... it should work no matter what the server is. The feature you are looking for is "recursive get" or something similar to that. There is also a utility called "wget" that can do that over both http and FTP.

Remember to always specify BINARY mode for your transfers. And to check your backups, no matter how you back up.
 

mbbrutman

Associate Cat Herder
Staff member
Joined
May 3, 2003
Messages
6,240
AnyoneYoubet,

Most people want their data to be safe. A file level backup (FTP) works for that purpose.

For a really comprehensive backup, including hidden files, directory structures, etc. you can mirror the hard drive. But given how small DOS is and how easy it is to re-install, most people will be happy with a file level backup.

(I still might include the ability to mirror an entire drive letter over FTP one day. I could use it. But the last time I suggested it nobody else commented on it so maybe it's not such a great idea.)
 

AnyoneYoubet

Member
Joined
Jun 9, 2013
Messages
34
Location
Canton, Pennsylvania USA
AnyoneYoubet,

Most people want their data to be safe. A file level backup (FTP) works for that purpose.

For a really comprehensive backup, including hidden files, directory structures, etc. you can mirror the hard drive. But given how small DOS is and how easy it is to re-install, most people will be happy with a file level backup.

(I still might include the ability to mirror an entire drive letter over FTP one day. I could use it. But the last time I suggested it nobody else commented on it so maybe it's not such a great idea.)

mbbrutman,

I really have not work in dos for a long time, so I'm a little Leary about giving advice on the subject.
I remember using xcopy to do backups on the machine I wanted to save the info.
more information:

Also another way was to use Back up and restore your computer's data with Norton Ghost.
I had used the program in win 98, I am not sure if it went all the way back to early dos.

one more thought:

If you boot from your floppy and have the program that runs the ftp software run from the floppy, you may share the entire hard drive as a share or not.
 

josephdaniel

Experienced Member
Joined
Jul 3, 2012
Messages
317
Location
Florence, Texas, United States
I have A, B, and C shared with full privilages to me. DOS 2.1 dosent have xcopy but I'm not going to attempt to archive 5mb of stuff on 360k floppys! I need to back everything up at the file level because I'm getting a new MFM controller and them i will put DOS 5.00 on there. I was also going to make a script for my client to do backups, it should be less than 15 lines long and it will make starting future backups faster.
I can't try wget right now as I am on a phone and my 5160 is only local on my network but I will try it as soon as I get home.
 

AnyoneYoubet

Member
Joined
Jun 9, 2013
Messages
34
Location
Canton, Pennsylvania USA

External - DOS 2.0 and above
Backs up one or more files from one disk to another.
BACKUP source destination-drive: [/S] [/M] [/A] [/F[:size]]
[/D:date[/T:time]] [/L[:[drive:][path]logfile]]

source Specifies the file(s), drive, or directory to back up.
destination-drive: Specifies the drive to save backup copies onto.
/S Backs up contents of subdirectories.
/M Backs up only files that have changed since the last
backup.
/A Adds backup files to an existing backup disk.
/F:[size] Specifies the size of the disk to be formatted.
/D:date Backs up only files changed on or after the specified
date.
/T:time Backs up only files changed at or after the specified
time.
/L[:[drive:][path]logfile]
Creates a log file and entry to record the backup
operation.
RESTORE[edit]

External - DOS 2.0 and above
Restores files that were backed up by using the BACKUP command.
RESTORE drive1: drive2:[path[filename]] [/S] [/P] [/B:date] [/A:date] [/E:time]
[/L:time] [/M] [/N] [/D]

drive1: Specifies the drive on which the backup files are stored.
drive2:[path[filename]]
Specifies the file(s) to restore.
/S Restores files in all subdirectories in the path.
/P Prompts before restoring read-only files or files changed since
the last backup (if appropriate attributes are set).
/B Restores only files last changed on or before the specified date.
/A Restores only files changed on or after the specified date.
/E Restores only files last changed at or earlier than the specified
time.
/L Restores only files changed at or later than the specified time.
/M Restores only files changed since the last backup.
/N Restores only files that no longer exist on the destination disk.
/D Displays files on the backup disk that match specifications.
a simple bat file then then be created .

mybackup.bat
cls
echo "Backing up";

---- the commands to back up -----

you could use "IF statement"
if %1 == 1 BACKUP
if %1 == 2 RESTORE

the syntax is most likely wrong , been so long, but I hope you get me.

then
A:mybackup.bat 1
or
A:mybackup.bat 2

or just put it in the autoexec.bat file and do the backups every time you restart the computer.
 
Last edited:
Top