Slickdeals Saves U! Apply for our $2,500 Spring scholarships today Learn More
Forum Thread

Tool or script to watch for when a file is present from network location...?

1,433 1,456 January 10, 2018 at 10:54 AM
Wondering if anyone knows of a tool or script or how to fix the following issue in Robocopy. What I'm trying to do:

I'm trying to use Robocopy to search for a specific file from a network location - and also it's many subfolders, within the last day. What I have is this:

Robocopy \source\subfolders\etc. \destination .txt /MAXAGE:1 /R:3 /W:10 /ETA - which gives me a "Skipped" message.

But if I change the source so it contains the exact folder where the file exists, it works??? It's driving me crazy! And I've tried /S but I don't want the subfolders copied over, just the file in the subs.

Thanks in Advance for any help!

7 Comments

1

Sign up for a Slickdeals account to remove this ad.

This comment has been rated as unhelpful by Slickdeals users
Joined Jul 2003
L10: Grand Master
34,289 Posts
6,120 Reputation
#2
Quote from boboli
:
Wondering if anyone knows of a tool or script or how to fix the following issue in Robocopy. What I'm trying to do:

I'm trying to use Robocopy to search for a specific file from a network location - and also it's many subfolders, within the last day. What I have is this:

Robocopy \source\subfolders\etc. \destination .txt /MAXAGE:1 /R:3 /W:10 /ETA - which gives me a "Skipped" message.

But if I change the source so it contains the exact folder where the file exists, it works??? It's driving me crazy! And I've tried /S but I don't want the subfolders copied over, just the file in the subs.

Thanks in Advance for any help!

/S copy Sub directories, but not empty ones

Try
/E "Including empty ones.


You are using the retry option ( /R:3 )
So the file isn't there yet, but the /S says to ignore empty folders,
With the /E instead, it can fail and then retry up to 3x after the W:x wait has completed each cycle.

For note my Fav Robocopy is
Robocopy \source\subfolders\etc. \destination /E /R:0 /W:0
I don't bother with retries and I dont' want it to wait...I want it to run NOW!!!!!
And I'll just run it again if need be.
Reply Helpful Comment? 0 0
Last edited by DC January 10, 2018 at 12:10 PM.
worshipTHANK YOU to those whom have fought and are fighting for our FREEDOMworship

Please Support Autism Awareness [autismspeaks.org]
Yahoo!Yahoo! 7/11/2009
This comment has been rated as unhelpful by Slickdeals users
Joined Nov 2007
L6: Expert
1,433 Posts
1,456 Reputation
Original Poster
#3
Quote from DC
:
/S copy Sub directories, but not empty ones

Try
/E "Including empty ones.


You are using the retry option ( /R:3 )
So the file isn't there yet, but the /S says to ignore empty folders,
With the /E instead, it can fail and then retry up to 3x after the W:x wait has completed each cycle.

For note my Fav Robocopy is
Robocopy \source\subfolders\etc. \destination /E /R:0 /W:0
I don't bother with retries and I dont' want it to wait...I want it to run NOW!!!!!
And I'll just run it again if need be.
Thanks, but that still copies the folders and I know the file isn't in an empty folder. The folder structure has a time stamp name in it which changes daily. Is there a way to put a wild card for this time stamp folder - as i know what the folder name is - and theres a lot of other folder names in the structure?
Reply Helpful Comment? 0 0
This comment has been rated as unhelpful by Slickdeals users
Joined Jul 2003
L10: Grand Master
34,289 Posts
6,120 Reputation
#4
Quote from boboli
:
Thanks, but that still copies the folders and I know the file isn't in an empty folder. The folder structure has a time stamp name in it which changes daily. Is there a way to put a wild card for this time stamp folder - as i know what the folder name is - and theres a lot of other folder names in the structure?
On this, I don't know Dontknow
Reply Helpful Comment? 0 0
This comment has been rated as unhelpful by Slickdeals users
Joined Jan 2006
L10: Grand Master
12,922 Posts
1,539 Reputation
#5
Quote from boboli
:
Thanks, but that still copies the folders and I know the file isn't in an empty folder. The folder structure has a time stamp name in it which changes daily. Is there a way to put a wild card for this time stamp folder - as i know what the folder name is - and theres a lot of other folder names in the structure?
You can do this in cygwin fairly trivially with the 'find' command. It supports filtering by create/modify time, wildcards in hostnames and then you pass the -exec flag to copy/move it to a location of your choice.
Reply Helpful Comment? 0 0
Steely blue eyes with no love in them scan the world
And a humourless smile with no warmth within greets the world
This comment has been rated as unhelpful by Slickdeals users
Joined Jun 2005
Let Sleeping Dogs Lie
6,428 Posts
2,507 Reputation
#6
you could try agent ransack using the command line it it very fast

https://help.mythicsoft.com/agent...ndline.htm
Reply Helpful Comment? 0 0
This comment has been rated as unhelpful by Slickdeals users
Joined Dec 2007
L10: Grand Master
7,985 Posts
1,528 Reputation
#7
Quote from boboli
:
Thanks, but that still copies the folders and I know the file isn't in an empty folder. The folder structure has a time stamp name in it which changes daily. Is there a way to put a wild card for this time stamp folder - as i know what the folder name is - and theres a lot of other folder names in the structure?
You say the file is in a time stamp named folder? What is an example of the time stamped named folder?
Reply Helpful Comment? 0 0

This comment has been rated as unhelpful by Slickdeals users
Joined Nov 2007
L6: Expert
1,433 Posts
1,456 Reputation
Original Poster
#8
Quote from menace33
:
You say the file is in a time stamp named folder? What is an example of the time stamped named folder?
Ended up scripting this with the time stamp as the only user input, and that variable is plugged into the network path, then robocopy the files to the destination, then moved the files from the folders, and finally delete the empty folders at the end.

Thanks all - some pretty handy search tools listed!
Reply Helpful Comment? 0 0
Page 1 of 1
1
Join the Conversation
Add a Comment
 
Copyright 1999 - 2018. Slickdeals, LLC. All Rights Reserved. Copyright / Infringement Policy  •  Privacy Policy  •  Terms of Service  •  Acceptable Use Policy (Rules)  •  Interest-Based Ads
Link Copied to Clipboard