FTPPutFile setting Host Directory based from root

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Junior Coder
Posts: 43
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

FTPPutFile setting Host Directory based from root

Post by gtdalsanto » Sun May 09, 2010 5:15 am

I am trying to put a file at the host folder based from the root directory. My problem is that when I log into the ftp site, it sets my default directory to TestDIR. When I set the host directory in the FTPPutFile command, it puts the file in a folder off of TestDIR. What I want it to do is to put the file based off the root directory (one level below TestDIR which is the login default). The folder exists, so I should be able to do this. Below is the syntax I am using:

ftpputfile>,,21,,Testfolder,,A

This places the file at the following folder:

/TestDIR/Testfolder/

What I want it to do though is put it to the following folder:

/Testfolder/

My problem is that I can't seem to put a file below the default login folder. Is there a way to do a change directory to get this to happen? I get the error 550-CWD cmd failed: EDC51291 No such file or directory. (errno2=0x05190050) when I put a slash in front of my host directory: /Testfolder

Is there any way to force a host directory path? If I use the DOS ftp utility, and log into the site, it defaults me to the TestDIR folder. But I then issue a cd .. command, and it puts me to the root. Then I do a change directory to the folder I want, then do the "put" file (Testfolder). I can't find a way to do this with the macroscheduler FTPPutFile command. Any help would be apprectiated.

Thanks.
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Marcus Tettmar
Site Admin
Posts: 7281
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon May 10, 2010 8:54 am

Not sure what the server OS is, but for a *nix based platform try this:

/Testfolder

or:

../Testfolder


Just Testfolder on its own will put it in Testfolder within the current directory.

/Testfolder sholud put it in the root dir's testfolder.

../ means go back one.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gtdalsanto
Junior Coder
Posts: 43
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Mon May 10, 2010 1:10 pm

None of these options worked. So I kept trying more combinations of the .. and /'s and found that if I put //TestDir, it would take it back one level. So if your userid/login puts you on a default folder, and you have permissions to go down a level (or however many levels), putting a // before your host directory will work, at least in my case. Not sure what OS this is, but will update when I find out. Thanks for the quick response, and the suggestions to try. I believe this is OS dependent like you said from the beginning.

Thanks again.

Gary
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts