Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thezidane

macrumors newbie
Original poster
Feb 20, 2010
2
0
I have a simple batch file to search my server for any excel files and was wondering if anyone could help me write this for my mac server?

@echo off
mkdir \files
xcopy C:\*.xls \files /S /D

any help would be much appreciated, thanks!
 
You might want to look at Smart Folders in Finder. It can more easily do this, unless you need actual copies.

If you want the same type of thing as your script, Mac is based on Unix and Unix has the mkdir command as well. There's also a copy command. Just do "man copy' to see its arguments and how to use it.
 
You might want to look at Smart Folders in Finder. It can more easily do this, unless you need actual copies.

Yeah, I didn't think of it, but Smart Folders are the smartest idea. To get copies in a different folder, just select all, and alt-drag the files to the place where you want a copy.
 
I forgot to mention that the batch file is usually on a USB flash drive. so it isn't just copying files from one directory to another, it is from one drive to another. can i still create a script with automator to search a drive and copy to another drive?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.