hoi. bedankt hiervoor, werkt idd.
maar ik wil graag een gehele map via dit scriptje uploaden, is dat ook mogelijk?
mvg Manuel
maar ik wil graag een gehele map via dit scriptje uploaden, is dat ook mogelijk?
mvg Manuel
---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate
urrrr... je pakt FTP commando, schrijft daar een batch file omheen en scheduled die? Ik kan me werkelijk niet voorstellen wat daar zo moeilijk aan is....Verwijderd schreef op vrijdag 09 februari 2007 @ 10:06:
maar ik wil idd schedulen ja:)
'Multiple exclamation marks,' he went on, shaking his head, 'are a sure sign of a diseased mind' (Terry Pratchett, Eric)
[ Voor 82% gewijzigd door Verwijderd op 09-02-2007 10:15 ]
Dat script staat toch gewoon op de site?Verwijderd schreef op vrijdag 09 februari 2007 @ 10:19:
batchftp en fileaze werken perfect.
maar ik heb de opdracht gekregen om dit voor elkaar te krijgen zonder geld uit te geven
IF "%1"=="" GOTO Syntax :: Create the temporary script file > script.ftp ECHO USER MyUserId >>script.ftp ECHO %1 >>script.ftp ECHO cd files/pictures >>script.ftp ECHO binary >>script.ftp ECHO prompt n >>script.ftp ECHO mget *.* :: Use the temporary script for unattended FTP :: Note: depending on your OS version you may have to add a '-n' switch FTP -v -s:script.ftp ftp.myhost.net :: For the paranoid: overwrite the temporary file before deleting it TYPE NUL >script.ftp DEL script.ftp GOTO End :Syntax ECHO Usage: %0 password :End
[ Voor 4% gewijzigd door Vaan Banaan op 09-02-2007 12:20 ]
500 "The server made a boo boo"
1
| ftp -i -s:<<File met commando's>> <<HOST>> |
1
2
3
4
5
6
7
| username password lcd c:\mapmetbestandendieikwiluploaden cd mapwaardebestandennaartoemoeten mput * close bye |
[ Voor 3% gewijzigd door J2pc op 09-02-2007 12:00 ]
"The computer is incredibly fast, accurate, and stupid. Man is unbelievably slow, inaccurate, and brilliant. The marriage of the two is a challenge and opportunity beyond imagination." © Stuart G. Walesh
Aah, ik wist dat ik zo'n ding ook ooit eens op mijn werk heb gemaakt. Je kan met dit batchbestand een upload commando scriptje genereren. Het maakt mkdir (sub)mappen commando's aan en mput vervolgens alle bestanden.J2pc schreef op vrijdag 09 februari 2007 @ 11:57:
-knip-
het commando
code:
1 ftp -i -s:<<File met commando's>> <<HOST>>
in het 'File met commando's' zet je vervolgens alle commando's die je uit wilt laten voeren, inclusief login etc.
voorbeeldje
code:
1 2 3 4 5 6 7 username password lcd c:\mapmetbestandendieikwiluploaden cd mapwaardebestandennaartoemoeten mput * close bye
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
| @ECHO OFF
REM Make FTP upload commmands script
REM Usage:
REM UPLOAD.BAT from to [scriptpath+name]
REM from = local folder (. = default folder)
REM to = remote folder (. = default remote folder)
IF "%~1"=="" GOTO :eof
IF "%~2"=="" GOTO :eof
SET files.upl="%~3"
IF %files.upl%=="" SET files.upl="%CD%\files.upl"
CD "%~1"
SET startfolder=%CD%
SET remote=%~2
ECHO binary>%files.upl%
ECHO prompt>>%files.upl%
ECHO cd "%remote%">>%files.upl%
SET thisfolder=
FOR /R %%A IN (.) DO SET lfolder=%%~fA& CALL :fill
SET files.upl=
SET lfolder=
SET remote=
SET startfolder=
GOTO eof:
:fill
REM fill script with FTP upload commands
SET rfolder=%lfolder%
CALL :makedir
CALL :copyfile
GOTO :eof
:makedir
REM FTP commands for relative mkdir and file permissions
REM . (huidige), ./folder, ./folder/folder enzovoort
FOR /F "tokens=1* delims=\" %%A IN ("%rfolder%") DO SET thisfolder=%thisfolder%\%%A& SET rfolder=%%B
IF NOT "%thisfolder:~1%"=="%startfolder%" GOTO :makedir
SET thisfolder=
IF "%rfolder%"=="" GOTO :eof
CALL :convert
SET temp1=
REM Owner read/write, rest of the world read permission
ECHO quote site umask 022>>%files.upl%
ECHO mkdir "%rfolder%">>%files.upl%
GOTO :eof
:copyfile
REM FTP commands for mput, file permissions
REM Owner read/write, rest of the world read permission
IF NOT "%rfolder%"=="" ECHO cd "%rfolder%">>%files.upl%
ECHO lcd "%lfolder%">>%files.upl%
ECHO quote site umask 133>>%files.upl%
ECHO mput *>>%files.upl%
IF "%rfolder%"=="" goto :eof
SET temp1=%rfolder%
SET rfolder=
CALL :chdir
ECHO cd "%rfolder%">>%files.upl%
GOTO :eof
:convert
REM Convert backslash to slash
FOR /F "tokens=1* delims=\" %%A IN ("%rfolder%") DO SET rfolder=%%A& SET temp1=%%B
IF "%temp1%"=="" GOTO :eof
SET rfolder=%rfolder%/%temp1%
GOTO :convert
:chdir
REM Return to default remote folder
SET rfolder=%rfolder%..
FOR /F "tokens=1* delims=/" %%A IN ("%temp1%") DO SET temp1=%%B
IF "%temp1%"=="" GOTO :eof
SET rfolder=%rfolder%/
GOTO :chdir
:eof |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| binary prompt cd "./test" lcd "C:\Documents and Settings\Vaan\Local Settings" quote site umask 133 mput * quote site umask 022 mkdir "Application Data" cd "Application Data" lcd "C:\Documents and Settings\Vaan\Local Settings\Application Data" quote site umask 133 mput * cd ".." quote site umask 022 mkdir "Application Data/Microsoft" cd "Application Data/Microsoft" lcd "C:\Documents and Settings\Vaan\Local Settings\Application Data\Microsoft" quote site umask 133 mput * cd "../.." quote site umask 022 mkdir "Application Data/Microsoft/CD Burning" cd "Application Data/Microsoft/CD Burning" lcd "C:\Documents and Settings\Vaan\Local Settings\Application Data\Microsoft\CD Burning" quote site umask 133 mput * cd "../../.." enzovoort.... |
500 "The server made a boo boo"