Jump to content

FTP command line: folders


Recommended Posts

Guest Patrick D.
Posted

Hi,

 

Windows Server 2003:

 

With FTP command line, it is not possible, to send multiple folders.

I need to send each folder manually after creating it, is this correct?

 

Is there a possibility to send entire folder-structures?

I need to have a bat-file, since I want to schedule FTP-jobs.

 

Can anybody help me?

 

Thanks.

 

Patrick

  • Replies 3
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

Re: FTP command line: folders

 

 

"Patrick D." <PatrickD@discussions.microsoft.com> wrote in message

news:27BA0A4A-F454-45D7-9C35-E1F0F0CD7B36@microsoft.com...

> Hi,

>

> Windows Server 2003:

>

> With FTP command line, it is not possible, to send multiple folders.

> I need to send each folder manually after creating it, is this correct?

>

> Is there a possibility to send entire folder-structures?

> I need to have a bat-file, since I want to schedule FTP-jobs.

>

> Can anybody help me?

>

> Thanks.

>

> Patrick

 

You could use the batch file below to send all files in the

current folder. To send a complete directory tree, complete

with all subdirectories, you would need to add some extra

coding. Alternatively you could use Google to look for

advanced ftp commands.

@echo off

set script="%temp%\script.scr"

set site=ftp.patrick.com

set account=pat

set password=somepassword

 

echo> %script% %account%

echo>>%script% %password%

echo>>%script% binary

for %%a in (*.*) do echo>>%script% put "%%a"

echo>>%script% quit

ftp -s:%Script% %site%

Guest Patrick D.
Posted

Re: FTP command line: folders

 

Hi Pegasus

 

Thanks a lot for your great coding service :-)

 

Maybe I can use your code in combination with windows backup to disk: I

won't always know all foldernames at the beginning. That's why I could simply

backup the folderstructure to disk. And then send this file(s) via ftp.

 

Patrick

 

"Pegasus (MVP)" wrote:

>

> "Patrick D." <PatrickD@discussions.microsoft.com> wrote in message

> news:27BA0A4A-F454-45D7-9C35-E1F0F0CD7B36@microsoft.com...

> > Hi,

> >

> > Windows Server 2003:

> >

> > With FTP command line, it is not possible, to send multiple folders.

> > I need to send each folder manually after creating it, is this correct?

> >

> > Is there a possibility to send entire folder-structures?

> > I need to have a bat-file, since I want to schedule FTP-jobs.

> >

> > Can anybody help me?

> >

> > Thanks.

> >

> > Patrick

>

> You could use the batch file below to send all files in the

> current folder. To send a complete directory tree, complete

> with all subdirectories, you would need to add some extra

> coding. Alternatively you could use Google to look for

> advanced ftp commands.

> @echo off

> set script="%temp%\script.scr"

> set site=ftp.patrick.com

> set account=pat

> set password=somepassword

>

> echo> %script% %account%

> echo>>%script% %password%

> echo>>%script% binary

> for %%a in (*.*) do echo>>%script% put "%%a"

> echo>>%script% quit

> ftp -s:%Script% %site%

>

>

>

Guest Pegasus \(MVP\)
Posted

Re: FTP command line: folders

 

Use a zip utility that preserves the folder structure, then ftp the

zip file to your backup medium.

 

 

"Patrick D." <PatrickD@discussions.microsoft.com> wrote in message

news:5931809A-C944-4EE0-9A53-AB08E7AC14BB@microsoft.com...

> Hi Pegasus

>

> Thanks a lot for your great coding service :-)

>

> Maybe I can use your code in combination with windows backup to disk: I

> won't always know all foldernames at the beginning. That's why I could

> simply

> backup the folderstructure to disk. And then send this file(s) via ftp.

>

> Patrick

>

> "Pegasus (MVP)" wrote:

>

>>

>> "Patrick D." <PatrickD@discussions.microsoft.com> wrote in message

>> news:27BA0A4A-F454-45D7-9C35-E1F0F0CD7B36@microsoft.com...

>> > Hi,

>> >

>> > Windows Server 2003:

>> >

>> > With FTP command line, it is not possible, to send multiple folders.

>> > I need to send each folder manually after creating it, is this correct?

>> >

>> > Is there a possibility to send entire folder-structures?

>> > I need to have a bat-file, since I want to schedule FTP-jobs.

>> >

>> > Can anybody help me?

>> >

>> > Thanks.

>> >

>> > Patrick

>>

>> You could use the batch file below to send all files in the

>> current folder. To send a complete directory tree, complete

>> with all subdirectories, you would need to add some extra

>> coding. Alternatively you could use Google to look for

>> advanced ftp commands.

>> @echo off

>> set script="%temp%\script.scr"

>> set site=ftp.patrick.com

>> set account=pat

>> set password=somepassword

>>

>> echo> %script% %account%

>> echo>>%script% %password%

>> echo>>%script% binary

>> for %%a in (*.*) do echo>>%script% put "%%a"

>> echo>>%script% quit

>> ftp -s:%Script% %site%

>>

>>

>>


×
×
  • Create New...