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?

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

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.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay