Using a DOS command…

I can’t believe I just googled how to copy files in DOS. But turns out that was way easier than copy/paste job under Windows. After downloading all those DRGs the other day, I ended up with a bunch of other files that I didn’t want – scattered among the *.tif’s  across a few hundred file folders.

To make things easy, I used:    xcopy c:\origin\*.tif c:\destination.

I had almost forgotten how much fun DOS used to be !

Or if you’d like to merge a bunch of files from different directories in one folder.

for /r c:\…\origin %i in (*.tif) do copy /y %i c:\…\destination

and for those darn temp files the downloader created (*****.tif.temp), I used:

ren c:\origin\????????.???.??? ????????.tif – one “?” for each character in the file name.

Advertisements

1 Comment

Filed under Uncategorized

One response to “Using a DOS command…

  1. I would suggest that you add a /b to the copy command so that you don’t end up truncating files when you copy them. Otherwise, there’s a long-standing “feature” in the copy command that will stop copying a file when it hits a text-EOF marker character ( 0x1a / 26 decimal ) in the file. This usually only manifests when the source file spec contains a wildcard character, but I’ve grown into always adding /b.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s