Upload command

new BookmarkLockedFalling
Janet
Global Moderator
*****

Janet Avatar

Posts: 276

Post by Janet on Sept 1, 2015 10:18:20 GMT -5

If I use the upload command, the file is saved in the RB root directory. I'd like to be able to upload / save the file to a subdirectory, specifically the public directory. Is there a way to do that natively with the upload command, or will I need a 3rd party ftp manager? Thanks.

Oh, and can I say how much I love runbasichosting!

Janet
[br]
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

Last Edit: Sept 1, 2015 13:54:45 GMT -5 by StefanPendl
[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
Janet
Global Moderator
*****

Janet Avatar

Posts: 276

Post by Janet on Sept 1, 2015 15:45:10 GMT -5

This is what I used

cls
oldDefaultDir$ = DefaultDir$
newDefaultDir$ = DefaultDir$;"/public"
upload "File to Upload", "*.txt";fName$
DefaultDir$ = oldDefaultDir$
end

The file is still being uploaded to the root directory. I have files that I've previously uploaded to public and resources subdirectories, but I think I was using a 3rd party ftp manager at the time.

Thanks for your feedback.

Janet
[br]
StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

Last Edit: Sept 3, 2015 15:05:55 GMT -5 by StefanPendl
[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM