How would you synchronize two folders.?

  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

so i have one folder on my windows partition where i store my music in the mp3 format, and a folder in my home directory in linux where i store the same music selection in ogg format. last night i created a simple little shell script to copy all of the files from one folder to the other, and after the copy, convert them. i'd like it so that when i boot to linux it automatically checks if theres new files in the windows folder, and if so - copies and converts them. then when i want to shutdown, have it check if theres new files in my linux folder and if so, copy / convert them.
how would i go about doing this..? :] thx
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

cp -u

Why not just install mp3 extensions though?
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

suse 10.2 alpha 5 :'(
the only available rpm's are for 10.1 and the only repo's are for 10.1 so when i try to use yast to install / update things, it tells me theres a conflict with like every package on my system...so i have to either build things from source or find one that just happens to work. and for some reason i haven't yet found one that works. lol
thanks tho :]


mmm...would the cp -u command care about the file extension? because once they get to the destination, the extension changes. so as of right now Emery - Walls.ogg != Emery - Walls.mp3
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

AnarchY SI wrote:
suse 10.2 alpha 5 :'(
the only available rpm's are for 10.1 and the only repo's are for 10.1 so when i try to use yast to install / update things, it tells me theres a conflict with like every package on my system...so i have to either build things from source or find one that just happens to work. and for some reason i haven't yet found one that works. lol
thanks tho :]

Makes sense to me
AnarchY SI wrote:
mmm...would the cp -u command care about the file extension? because once they get to the destination, the extension changes. so as of right now Emery - Walls.ogg != Emery - Walls.mp3

Good point, I was somehow thinking you were copying the mp3s to an intermediary folder on the Linux system for some reason, which would allow this. The best I could tell you would be to write something in perl to handle the checking of files which would then call your conversion script for any new ones.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

that sounds like a good idea.
would something written in C be faster..? i have limited experience with perl, but i would like to get a more intimate knowledge of it.. ^_^
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Something in C would indeed operate faster, but unless you have a ton of files it probably won't make much difference either way. I simply suggested Perl because more people are familiar with that.
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

iIi c.
well i have like, ~2,700 files.. so idk if thats a lot or not.
but sweet :D


idk, maybe one of these times i'm bored i'll build in a timer to them and have them time themselves to see how long it takes each to execute. sounds fun :]

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 37 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.