Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#336870 - 08/09/2010 18:10 Move files automatically?
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
I'm looking for a program that I thought for sure would exist, but I'm having difficulty tracking down.

What I want is pretty straightforward: a program that will watch a folder, and when it sees something in that folder it moves it to another folder or multiple folders.

Basically I'm looking for Dropbox for local file organization, and also I don't want to copy the files, just move them entirely.

Is there something that will do this on Windows?
_________________________
Matt

Top
#336871 - 08/09/2010 18:16 Re: Move files automatically? [Re: Dignan]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
How does this folder-watching program know that the program that created the files is done writing to them?
_________________________
- Tony C
my empeg stuff

Top
#336872 - 08/09/2010 18:20 Re: Move files automatically? [Re: tonyc]
larry818
old hand

Registered: 01/10/2002
Posts: 1039
Loc: Fullerton, Calif.
Just creating a shortcut to that folder won't work? I'm assuming you want the folder always empty?

Top
#336873 - 08/09/2010 19:03 Re: Move files automatically? [Re: larry818]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Originally Posted By: tonyc
How does this folder-watching program know that the program that created the files is done writing to them?

That's an excellent question, and I was thinking the same thing, but I assume that it wouldn't be a problem. How does a program like Dropbox know the same thing?

Originally Posted By: larry818
Just creating a shortcut to that folder won't work? I'm assuming you want the folder always empty?

Exactly. I need the files moved completely.
_________________________
Matt

Top
#336874 - 08/09/2010 19:09 Re: Move files automatically? [Re: larry818]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
robocopy.exe /mov /mot (or possibly /mon depending on your needs)

Top
#336879 - 08/09/2010 21:02 Re: Move files automatically? [Re: drakino]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
There are definitely a number of programs out there for Windows that watch folders for you and can then run arbitrary commands/scripts on the files that appear - after they've been written. Such as DirMon

When a file is being written it'll be locked by the program doing the writing, will it not? When that lock has been released, it's ready to go. In any case, plenty of software supports this kind of file monitoring feature, so it's probably something pretty straight forward on the OSes that they're written for.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#336888 - 08/09/2010 23:15 Re: Move files automatically? [Re: hybrid8]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
At its simplest, a scheduled batch file running

move x:\file\location\*.* y:\new\location

If the file is still open and locked it will just fail and try it again next time. You have to assume that whatever creates the file has exactly one chance of writing it. As soon as it closes it and loses the lock, it's fair game.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#336946 - 09/09/2010 23:42 Re: Move files automatically? [Re: Shonky]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
A program could be written to do that- but the question is exactly why? Basically what you want is a folder where anything that is written there gets moved (not copied) somewhere else. Err.. why not just write the file in that target folder to begin with?
Then you mention that you want the program to possibly move to multiple folders- well that's not a move then that's a copy.
I could see if you wanted a program where based on the filename or attributes it would move to different folders, but to move every single file seems kind of useless to me.

Top
#336950 - 10/09/2010 00:28 Re: Move files automatically? [Re: siberia37]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
The folder in question might be a drop box. Let stuff in but make it unavailable as soon as practical.
_________________________
Glenn

Top
#336954 - 10/09/2010 12:40 Re: Move files automatically? [Re: gbeer]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
That's more easily solved with permissions. Most filesystems will allow writes without reads.
_________________________
Bitt Faulk

Top
#336962 - 10/09/2010 15:04 Re: Move files automatically? [Re: siberia37]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: siberia37
A program could be written to do that- but the question is exactly why? Basically what you want is a folder where anything that is written there gets moved (not copied) somewhere else. Err.. why not just write the file in that target folder to begin with?
Then you mention that you want the program to possibly move to multiple folders- well that's not a move then that's a copy.
I could see if you wanted a program where based on the filename or attributes it would move to different folders, but to move every single file seems kind of useless to me.

The simple answer is that he's probably working with something he doesn't get to control. For example whatever is putting files in the directory may be configured to always write files into that particular location, or may not have the flexibility to write files into different locations or write multiple copies into multiple locations.

Or, it could be a drop-box scenario, where the drop-box is a publicly accessible directory that's screened off to prevent people from wandering around in the system (a common technique for FTP drops), but the eventual destination of the files is somewhere else, so you have a background process with more permissions move things into the desired location.

Lots of reasons for wanting a program like this...

Top
#337300 - 17/09/2010 18:44 Re: Move files automatically? [Re: canuckInOR]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Okay, now that I'm in need of it, here's the use case:

My wife and I have separate computers and separate photo collections, but we just bought a camera and we want the photos from it to be on both of our systems.

I've purchased an Eye-Fi for the new camera. If you aren't familiar with Eye-Fi, it's a great little device. It's an SD card that can transfer your photos over to your computer wirelessly when it sees your home network. It'll automatically move the photos over and sort them into folders.

But this can only be installed on one computer at a time. What I need is to be able to then have those files copied to another computer on the network. Naturally, I could do this manually, but I'd like to be able to do it automatically.

Is that possible?
_________________________
Matt

Top
#337301 - 17/09/2010 18:56 Re: Move files automatically? [Re: Dignan]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
See my robocopy post above. It's built in on Vista and 7, just set it up as a startup task or something. /mov is "move files" and it has a ton of other options to do exactly what you want. /mon tells it to monitor a folder and do the move/copy again after X changes (user configurable), or mot (X time).

Top
#337302 - 17/09/2010 19:16 Re: Move files automatically? [Re: drakino]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12338
Loc: Sterling, VA
Okay, I'll experiment with that and see if it does what I need. Thanks!

*edit*

But wait, how do I give it the rest of the information, like which folder to monitor and which folder to move to?


Edited by Dignan (17/09/2010 19:17)
_________________________
Matt

Top
#337303 - 17/09/2010 19:53 Re: Move files automatically? [Re: Dignan]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Open a command prompt and type "powershell /?"

It's going to product a very long help list, as it does have a ton of options. It's worth scanning them all, to see what might be useful for your exact setup. There are a number of Robocopy GUIs, but most just spam out the same list of options with checkboxes.

Top
#337305 - 17/09/2010 20:19 Re: Move files automatically? [Re: drakino]
hybrid8
carpal tunnel

Registered: 12/11/2001
Posts: 7738
Loc: Toronto, CANADA
Or just use the program I linked to - it's super simple.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software

Top
#337306 - 17/09/2010 21:15 Re: Move files automatically? [Re: Dignan]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5549
Loc: Ajijic, Mexico
Originally Posted By: Dignan

But wait, how do I give it the rest of the information, like which folder to monitor and which folder to move to?
Couldn't you just download the pictures from your cameras always onto one computer, then every once in a while use a backup program to do a limited backup across the network? The backup program will have its own scheduler built in, and you can specify the source and destination paths in as much detail as you want.

Since this seems like a simple solution, no doubt I am misunderstanding what it is you are trying to do. smile

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#337308 - 18/09/2010 01:40 Re: Move files automatically? [Re: Dignan]
pca
old hand

Registered: 20/07/1999
Posts: 1102
Loc: UK
Hi.

You may find that PureSync does what you want. I use it to mirror my working directory structure on my main windows box across the network to the linux fileserver, and from there to the laptop. It also handles replicating copies of the acronis backup files. It took a little while to set up, but works completely reliably in the background.

You can set it to monitor a specific directory for changes, and after a period of time since the last change, make the copy. It has a lot of other options and modes as well.

pca
_________________________
Experience is what you get just after it would have helped...

Top
#337316 - 18/09/2010 15:21 Re: Move files automatically? [Re: Dignan]
Taym
carpal tunnel

Registered: 18/06/2001
Posts: 2504
Loc: Roma, Italy
Originally Posted By: Dignan
But wait, how do I give it the rest of the information, like which folder to monitor and which folder to move to?


robocopy will do that. Just look at the help (robocopy /?).
I too use robocopy for my daily backup. I've done so for years and it just works.
_________________________
= Taym =
MK2a #040103216 * 100Gb *All/Colors* Radio * 3.0a11 * Hijack = taympeg

Top
#337343 - 20/09/2010 03:27 Re: Move files automatically? [Re: Taym]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3584
Loc: Columbus, OH
If you're like me and already familiar with rsync, cwRsync might be what you're looking for. Works great for me.
_________________________
~ John

Top
#337349 - 20/09/2010 13:30 Re: Move files automatically? [Re: drakino]
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1914
Loc: London
I'd use Replicator from karenware.com, unbelievably easy to use and plenty of options.

I've been using it for years.

Top
#337369 - 20/09/2010 22:59 Re: Move files automatically? [Re: tahir]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5549
Loc: Ajijic, Mexico
Originally Posted By: tahir
I've been using it for years.
And here I thought I was the only oddball geek using that. I've used it for the last five years or so and have been quite pleased with it.

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#337377 - 21/09/2010 11:47 Re: Move files automatically? [Re: tanstaafl.]
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1914
Loc: London
Originally Posted By: tanstaafl.
I thought I was the only oddball geek using that.


Heh smile

It's just sooo simple, only had one issue; when I first started backing up my MP3s I had a MAJOR accident, I'd set the job in the wrong direction (from empty drive to live drive) and I had delete non existent files checked! I lost 1000+ ripped CDs (2 years to rip), just like that. That's when I changed to Audiograbber from whatever the Xing ripper was called. I didn't even have a means of playing them back at that stage.

Wonder how long ago that was?

Top
#337428 - 21/09/2010 19:51 Re: Move files automatically? [Re: tahir]
tanstaafl.
carpal tunnel

Registered: 08/07/1999
Posts: 5549
Loc: Ajijic, Mexico
Originally Posted By: tahir
I lost 1000+ ripped CDs (2 years to rip), just like that.

You weren't able to restore the data with something like Recuva?

I did something similar but not with Replicator, I was erasing an external USB drive preparatory to using Replicator to copy an internal drive to it, and somehow erased the internal (source) drive instead, Shift-Del on the root folder! Recuva brought all the data back except for one photograph. Don't know why it didn't get that.

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"

Top
#337450 - 22/09/2010 08:43 Re: Move files automatically? [Re: tanstaafl.]
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1914
Loc: London
Originally Posted By: tanstaafl.
I did something similar but not with Replicator, I was erasing an external USB drive preparatory to using Replicator to copy an internal drive to it, and somehow erased the internal (source) drive instead, Shift-Del on the root folder! Recuva brought all the data back except for one photograph. Don't know why it didn't get that.


Glad to know I'm not the only one! Unfortunately it was a while before I realised what I'd done, I tried various undelete utilities with varying degrees of success. But by then I'd also realised that encoding at 128k was not a good idea so started re-ripping anyway.

Top
#337485 - 22/09/2010 23:05 Re: Move files automatically? [Re: tahir]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
Windows has a way to make a mapped network share work offline.
The files are copied to the local machine and may be synchronized, either manually or on a schedule.

No need for any additional software.
_________________________
Glenn

Top