DEV Community

Catur Hidayat
Catur Hidayat

Posted on

3 1

FTP - Upload files without folder structure

Hi all

previously apologize if my question is not related to programming.

case:
I have some files. all divided into several month folders.
I plan to upload files via FTP, but without the folder structure. inside the FPT folder will only have files that exist in some local folders.

src :

MyFolder

# Jan
    - File Jan 1
    - File Jan 2
# Feb
    - File Feb 1
    - File Feb 2
# Mar
    - File Mar 1
    - File mar 2
# Apr
    - File Apr 1
    - File Arp 2
Enter fullscreen mode Exit fullscreen mode

Dest / FTP Folder:

MyFolder

- File Jan 1
- File Jan 2
- File Feb 1
- File Feb 2
- File Mar 1
- File mar 2
- File Apr 1
- File Arp 2
Enter fullscreen mode Exit fullscreen mode

is there an FTP app that can do that?

Sentry image

Make it make sense

Make sense of fixing your code with straight-forward application monitoring.

Start debugging →

Top comments (4)

Collapse
 
moopet profile image
Ben Sinclair • Edited

Something like for f in $(find . -type f); do curl -T $f ftp://ftp.my-site.example/com/my-path/ --user jeff:jeffspassword; done would probably do what you want if you absolutely must, but like Dian says... don't.

Collapse
 
brokylabs profile image
Catur Hidayat

Okay, thanks for the feedback

Collapse
 
dmfay profile image
Dian Fay

You want rsync. ftp should be avoided in general as it's insecure -- use sftp or, even better, scp.

Collapse
 
brokylabs profile image
Catur Hidayat

for now, I use WInSCP.
it looks like there is no "rsync" feature.

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay