Sponsored Content
Top Forums UNIX for Dummies Questions & Answers FTP mget will only grab files not folders Post 302960592 by mpatton on Tuesday 17th of November 2015 11:48:06 AM
Old 11-17-2015
FTP mget will only grab files not folders

Hey All,

first post Smilie

So I am writting a script to pull down files from an ftp that will be called from a bat file on windows. This seems pretty straight forward, and grabs all of the "files" in the cd location, but I am running into some permission issue that will not allow me to grab folders. When going through FileZilla ftp client I am able to transfer the folder over no problem, so I am not sure of the source of this permission mismatch.

The .bat runs
Code:
FTP -v -i -s:scrptfile.ftp.txt

and scrptfile.ftp.txt is:
Code:
open example.com
username
password
lcd D:\PulledFromFTP
cd  \Send2PulledFromFTP
binary
mget "*.*"
disconnect
bye


Folder contents of cd:
TestDirectory.... (Folder)
-> InternalTestPacket.... (File)
TestPacket.... (File)
TestPacketEmpty... (File)


***Script only brings over the two files: TestPacket and TestPacketEmpty
and says "Permission denied" when trying to copy over "TestDirectory"


Any idea?

---------- Post updated at 11:48 AM ---------- Previous update was at 11:40 AM ----------

I tried it a handful of times again, looked in my folder, and it moved the TestDirectory Folder over?!?!

--On the command line it says--
200 Command okay.
Error opening local file TestDirectory
>TestDirectory:Unknown error number


..
..
..
then tried again and got 550 Permission denied

Last edited by vbe; 11-17-2015 at 12:43 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mget (ftp command)

hey, I was wondering if its possible to use a complete path and file name using the mget command example mget /dir1/dir2/dir3/file.ext or get /dir1/dir2/dir3/file.ext because whenever i try its says file not found or permission denied..... but if i do cd dir1 cd dir2 cd dir3 mget... (2 Replies)
Discussion started by: Ganondorf
2 Replies

2. UNIX for Advanced & Expert Users

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys autosys 14592 Aug 19... (1 Reply)
Discussion started by: spatra
1 Replies

3. Shell Programming and Scripting

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys ... (1 Reply)
Discussion started by: spatra
1 Replies

4. Shell Programming and Scripting

Help needed to transfer list of files to FTP server, to different folders

Hello Unix Gurus, Help required from you. My requirement is something like this I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server. I have created custom program, where I will extract all the... (4 Replies)
Discussion started by: amazon
4 Replies

5. Shell Programming and Scripting

shell script - ftp downloading serveral files without mget

Hello guys, i'm searching for a solution how to download all files from root-directory of an ftp-server through an ftp proxy getting through the ftp proxy and download one file with get ist no problem, but mget * does nothing! ftp -n -i -v <<EOF open proxyHost proxyPort user... (19 Replies)
Discussion started by: macProgger23
19 Replies

6. Shell Programming and Scripting

Ftp-mget

For the below mentioned code..Files are getting transferred from first mget statement alone ie from /home/Arun/*EF01/...Could someone help me regarding this ftp -vn <<EOD >$LOG open user lcd ascii mget /home/Arun/*EF01/GLHEC* mget /home/Arun/*EF03/GLHEC* mget... (3 Replies)
Discussion started by: infernalhell
3 Replies

7. AIX

ftp mget directory

Hi, I have searched everywhere for an answer to this question but couldn't find one so I ask it here. From an AIX 5.3 machine I ftp to another AIX 5.3 server. I want to get all files and only files in a directory. This directory has a subdirectory with files in it. In ftp, I enter the... (5 Replies)
Discussion started by: bheinsius
5 Replies

8. Shell Programming and Scripting

problem with ftp mget

Hi I am trying to ftp all the files from a directory in server2 to server1 (both unix) The below code is in server1 ftpfile=/home/anitha/ftptxt echo cd mydir >>$ftpfile echo mget *.* >>$ftpfile cat $ftpfile | ftp -i server2 mydir is a directory in server2 and there are some test files in... (4 Replies)
Discussion started by: anijan
4 Replies

9. Shell Programming and Scripting

Ftp mget exclusion question

In the script I am doing a mget for multiple files. How can I exclude just one file which I do not need to ftp ? (3 Replies)
Discussion started by: jville
3 Replies

10. UNIX for Advanced & Expert Users

Help with get/mget from FTP server with files older than 10 minutes

Hi! I am new to unix and this forum as well.. Can someone please help me : I want to "get/mget" files which are older than 10 minutes from a remote FTP server like "ftp.com". After getting the files to local unix server say "Prod.com" , i need to delete only those files from ftp.com which... (4 Replies)
Discussion started by: SravsJaya
4 Replies
OPENCHANGEPFADMIN(1)					     OpenChange Users' Manual					      OPENCHANGEPFADMIN(1)

NAME
openchangepfadmin - Exchange users and Public Folder administration tool SYNOPSIS
openchangepfadmin [-?] [-?|--help] [--usage] [-f|--database PATH] [-p|--profile PROFILE] [-P|--password PASSWORD] [--apassword=PASSWORD] [--adesc=DESCRIPTION] [--acomment=COMMENT] [--afullname=NAME] [--list] [--mkdir] [--rmdir] [--comment=COMMENT] [--dirclass=CLASS] [--adduser=USERNAME] [--rmuser=USERNAME] [--addright=RIGHT] [--rmright] [--modright=RIGHT] [--debuglevel=LEVEL] [--dump-data] [--folder=FOLDER] [--username=USERNAME] DESCRIPTION
openchangepfadmin is a administrative command line tool designed to facilitate user management related operations (create, delete, modify) on a remote Exchange server and manage public folder store and permissions. COMMANDS
--adduser=USERNAME Create a Exchange user with the username specified by USERNAME --rmuser=USERNAME Delete the Exchange user account specified by USERNAME --list List Public Folder hierarchy (IPM_SUBTREE) --mkdir Create a folder in the Public Folder store --rmdir Delete a folder in the Public Folder store --addright=RIGHT Add permission and roles for a user on a Public Folder directory. --modright=RIGHT Modify permissions and roles for a user on a Public Folder directory --rmright Delete permissions and roles for a specific user OPTIONS
--database=DATABASE -f Set the MAPI profile database. If no database is specified, then openchangeclient tries to load the default one: $HOME/.open- change/profiles.ldb --profile=PROFILE -p Set the profile to use. If a profile is not specified, and one of the profiles has been set as the default in the profile database (for example, using mapiprofile -S), then that default profile will be used. --password -P Set the password for the profile to use. This can be omitted if the password is stored in the profile. --apassword=PASSWORD Define the password to set for the user specified with --adduser. If no password is explicitely supplied, openchangepfadmin will arbitrary set a random one. --adesc=DESCRIPTION This command can only be used with --adduser and specifies a description for this account --acomment=COMMENT This command can only be used with --adduser and specifies a comment for this account. --afullname=NAME This command can only be used with --adduser and specifies the user full name for this account. --comment=COMMENT This command can only be used with --mkdir and specifies a comment for the folder. --dirclass=CLASS This command can only be used with --mkdir and specifies the container class of the directory we want to create. Possible values are: IPF.Appointment, IPF.Contact, IPF.Journal, IPF.Note, IPF.StickyNote, IPF.Task, IPF.Post --folder=FOLDER This command can only be used with --addright, --modright and --rmright. Specify the folder where permissions and roles have to be changed. --username=USERNAME This command can only be used with --addright, --modright and --rmright. Specify the username we want to change permissions and roles for. --dump-data Dump the hex data. This is only required for debugging or educational purposes. --debuglevel LEVEL -d Set the debug level. EXAMPLES
Creating user openchangepfadmin --adduser=linuxowner --apassword=linuxowner --adesc="Linux Owner Test account" --afullname="Linux Owner" mapiadmin_user_add : MAPI_E_SUCCESS (0x0) username: linuxowner password: linuxowner Creates a user account with username and password set to linuxowner. Deleting user: openchangepfadmin --rmuser=linuxowner mapiadmin_user_del : MAPI_E_SUCCESS (0x0) Create Public Folder: openchangepfadmin --mkdir --folder=public_events --dirclass=IPF.Appointment Creates a folder in the Public Folder store named public_events with a container class set to Appointment. This folder will display calen- dar items. Delete Public Folder: openchangepfadmin --rmdir --folder=public_events List Public Folder hierarchy: openchangepfadmin --list Add Permission: openchangepfadmin --username=linuxowner --folder=public_events --addright=RoleOwner Permission RoleOwner added for linuxowner on folder public_events Modify Permission openchangepfadmin --username=Anonymous --folder=public_events --modright=RoleNone Permission changed to RoleNone for Anonymous on folder appointment Note that you can only change permissions for a user already listed in the ACL table. NOTE
Permissions and Roles possible values are: o RightsNone o RightsReadItems o RightsCreateItems o RightsEditOwn o RightsDeleteOwn o RightsEditAll o RightsDeleteAll o RightsCreateSubfolders o RightsFolderOwner o RightsFolderContact o RoleNone o RoleReviewer o RoleContributor o RoleNoneditingAuthor o RoleAuthor o RoleEditor o RolePublishAuthor o RolePublishEditor o RightsAll o RoleOwner SEE ALSO
AddUserPermission, ModifyUserPermission, RemoveUserPermission AUTHOR
Julien Kerihuel <j.kerihuel at openchange dot org> OpenChange 2.0 QUADRANT 2013-01-24 OPENCHANGEPFADMIN(1)
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy