Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi everyone i need some help please i have made this ftp script but what i want to do is transfer a folder over ftp i cant seem to get it to work it will transfer anything else apart from a folder.
username
password
cd /e/dashboard/xTV/Skin/
bin
hash
ascii
mput Amped
bye

That is correct; you cannot transfer a directory from the command line FTP. You must do it manually. I.E.:
mdir Amped
cd Amped
mput *
for each and every directory you wish to copy.

another way is to use tools like tar to combine the files in the directory to one single file. then you can ftp this whole file

the batch i made it to build a SVN skin for Xbox media center then ftp the output skin folder over to the xbox but all skins have different sub folders ie. amped/fonts/*ttf where as xTV is xTV/fonts/newfont/*ttf.
Is it not possible to creat a log file with all dir's listed in this txt file and then the ftp send each file over because each folder is different here is a list of the files in the folder.
C:\Documents and Settings\Administrator\Desktop\amped\1080i
C:\Documents and Settings\Administrator\Desktop\amped\720p
C:\Documents and Settings\Administrator\Desktop\amped\Amped_ReadMe.txt
C:\Documents and Settings\Administrator\Desktop\amped\fonts
C:\Documents and Settings\Administrator\Desktop\amped\media
C:\Documents and Settings\Administrator\Desktop\amped\NTSC
C:\Documents and Settings\Administrator\Desktop\amped\NTSC16x9
C:\Documents and Settings\Administrator\Desktop\amped\PAL
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9
C:\Documents and Settings\Administrator\Desktop\amped\skin.xml
C:\Documents and Settings\Administrator\Desktop\amped\sounds
C:\Documents and Settings\Administrator\Desktop\amped\1080i\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\720p\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDM2L__.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LEDREALI.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LED_REAL.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LED_REAL.TXT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\TCM.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDM2B__.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDM2N__.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDM2U__.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDMB___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDML___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDMN___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LCDMU___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\LICENSE.TXT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDMonoWinTT\README.TXT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD-BOLD.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD-L___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD-N___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD-U___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD2B___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD2L___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD2N___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LCD2U___.TTF
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\LICENSE.TXT
C:\Documents and Settings\Administrator\Desktop\amped\fonts\LCDWinTT\README.TXT
C:\Documents and Settings\Administrator\Desktop\amped\media\textures.xpr
C:\Documents and Settings\Administrator\Desktop\amped\NTSC\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\NTSC16x9\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\CommonViews.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\custom_SkinSetting_1112.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Defaults.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogAlbumInfo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogButtonMenu.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogContentSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogContextMenu.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogFavourites.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogFileStacking.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\dialogGamepad.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogHost.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogInvite.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogKaiToast.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogKeyboard.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogMediaSource.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogMusicScan.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogMuteBug.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogNetworkSetup.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\dialogNumeric.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogOK.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogProgress.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogScriptInfo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogSeekBar.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogSelect.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogSubMenu.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogVideoInfo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogVolumeBar.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\DialogYesNo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\FileBrowser.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\FileManager.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Home.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Home.xml.bak
C:\Documents and Settings\Administrator\Desktop\amped\PAL\includes.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\LockSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\LoginScreen.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MusicOSD.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MusicOSDVisSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MusicOverlay.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MusicVisualisation.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyBuddies.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyGameSaves.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyMusicNav.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyMusicPlaylist.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyMusicPlaylistEditor.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyMusicSongs.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyPics.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyPrograms.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyScripts.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyVideo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyVideoNav.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyVideoPlaylist.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\MyWeather.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\PlayerControls.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Pointer.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\ProfileSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Settings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SettingsCategory.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SettingsProfile.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SettingsScreenCalibration.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SettingsSystemInfo.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SettingsUICalibration.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\SlideShow.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Startup.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\TrainerSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\Translate.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VideoFullScreen.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VideoOSD.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VideoOSDBookmarks.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VideoOSDSettings.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VideoOverlay.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL\VisualisationPresetList.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\CommonViews.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\CommonViews.xml2
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\Font.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\Home.xml
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\Home.xml2
C:\Documents and Settings\Administrator\Desktop\amped\PAL16x9\includes.xml
C:\Documents and Settings\Administrator\Desktop\amped\sounds\back.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\click.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\cursor.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\notify.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\out.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\shutter.wav
C:\Documents and Settings\Administrator\Desktop\amped\sounds\sounds.xml
C:\Documents and Settings\Administrator\Desktop\amped\sounds\start.wav

It's possible, and I might throw something up when I wake up, but it'd be much easier to get some GUI FTP (like FileZilla) and use that.

I think you need to CD to each directory in turn [on client and server] and mput one dir at a time.
=====================================
If at first you don't succeed, you're about average.M2

I'm going through it now.
Is it working?
=====================================
If at first you don't succeed, you're about average.M2

Here is the new batch file with the skin folder so that you can see how the batch works and test it.

That rar is 11MB LOL.
I'm not going to replicate the directory structure and then to to figure out what the BAT is trying to do.
It's over to you to say what's working and what isn't.
BTW, some of your code can be simplified.
This:
Set /p choice= [Y,N]=
If '%choice%'=='y' goto setup
If '%choice%'=='n' goto skinsetup
If '%choice%'=='Y' goto setup
If '%choice%'=='N' goto skinsetupcan be:
choice & goto :!errorlevel!
=====================================
If at first you don't succeed, you're about average.M2

the only thing that is not working is the transfer of a folder using command FTP
the batch works fine its just i want to transfer the output folder to the xbox once it has been created but i cant do that.
it doesnt recognize the folder.
this is y i asked if you can use a log.txt file to list all the files in all the subfolders then transfer them using the log file as a template or guide.

In your ftp script maker, you will probably need lines like these:
@echo off
>> #.ftp echo ! cd c:\files
>> #.ftp echo cd /files
>> #.ftp mput *.*
>> #.ftp echo ! cd c:\util
>> #.ftp echo cd /util
>> #.ftp mput *.*=================
So it changes DIRs on client and server and send the files.
=====================================
If at first you don't succeed, you're about average.M2

Actually,he'll need to do use lcd, as !cd would start a new shell, run the cd command, then exit.

AHA!
Thanks Razor2.3
=====================================
If at first you don't succeed, you're about average.M2

am sorry but you guys have compleatly lost me sorry could you do an example of my ftp code using your new ftp code so that i know how to set it up please.

You need a section or subroutine like this to create and run an ftp script.
In this example the two directories are uril and files.
=======================================
@echo off> #.ftp echo o mydomain
>> #.ftp echo username
>> #.ftp echo password
>> #.ftp echo bin
>> #.ftp echo prompt
>> #.ftp echo lcd c:\files
>> #.ftp echo cd /files
>> #.ftp echo mput *.*
>> #.ftp echo lcd c:\util
>> #.ftp echo cd /util
>> #.ftp echo mput *.*
>> #.ftp echo byeftp -s:#.ftp
===========================
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |