Python Forum
Sync folder over network
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sync folder over network
#4
I don't know how familiar are you with cli interface but you can create these directories that way (bash):

mkdir -p PCs/192.168.1.{001..050}

$ mkdir -p PCs/192.168.1.{001..050}
$ ls PCs/
192.168.1.001  192.168.1.011  192.168.1.021  192.168.1.031  192.168.1.041
192.168.1.002  192.168.1.012  192.168.1.022  192.168.1.032  192.168.1.042
192.168.1.003  192.168.1.013  192.168.1.023  192.168.1.033  192.168.1.043
192.168.1.004  192.168.1.014  192.168.1.024  192.168.1.034  192.168.1.044
192.168.1.005  192.168.1.015  192.168.1.025  192.168.1.035  192.168.1.045
192.168.1.006  192.168.1.016  192.168.1.026  192.168.1.036  192.168.1.046
192.168.1.007  192.168.1.017  192.168.1.027  192.168.1.037  192.168.1.047
192.168.1.008  192.168.1.018  192.168.1.028  192.168.1.038  192.168.1.048
192.168.1.009  192.168.1.019  192.168.1.029  192.168.1.039  192.168.1.049
192.168.1.010  192.168.1.020  192.168.1.030  192.168.1.040  192.168.1.050
With a help of a little shell script, you can map these dirs to the shared remote dirs to avoid the manual work. I do not know bash syntax very well but it's a simple approach:
#!/bin/bash
#
for directory in $(ls /path/PCs/); do
    # mount the remote directory here
done
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
Sync folder over network - by Guybrush - May-11-2018, 10:53 AM
RE: Sync folder over network - by wavic - May-11-2018, 11:13 AM
RE: Sync folder over network - by Guybrush - May-15-2018, 07:38 AM
RE: Sync folder over network - by wavic - May-15-2018, 09:14 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020