top of page

You can write a simple batch file script to copy files from one location to another in this format:

The command XCOPY comes first, followed by the path of the file you want to copy, and then the destination folder you want the files copied to. You can repeat this line of script for as many files as you want to copy.

As explained in past tips on how to use batch files to delete files; and to create folders, when you have the script set up the right way you just need to change the extension to '.bat', and double-click.

The real insider tip here tonight is to avoid the mistake of naming the batch file with the command 'XCOPY'. So when using this script if you click on a file named xcopy.bat instead of the script executing it will get caught in a loop, and nothing will be copied. You'll see this in the command prompt:

Naming the file copy.bat will do the trick.


 
 

In order to get a list of hidden files or folders in a directory, you can use this command:

dir /a:h >hiddenlist.txt

In this example we begin with a folder with these apparent contents:

Simply go to a particular folder on a drive, hold SHIFT + CTRL right click and select, 'Open command window here' .

Type in the command and press ENTER.

You'll see a text file is generated which lists a folder and a file at the root which were actually hidden.

Of course in Windows Explorer you can change a setting so hidden folders and files are always shown by going to Tools . . . Folder Options . . . View tab and checking off 'Show hidden folders, files and drives.', but when performing data collection it's good to be able to focus on things a user may have hidden.


 
 

If you want to get a list of all of the subfolders in one location on a drive you can use the Windows command TREE. This command followed by a file path will then list all of the files in the directroy.

TREE "C:\Users\SeanKOShea\Documents\PBWT\tips" /F "C:\Users\SeanKOShea\Documents\PBWT\tips" >list.txt

. . . will give you a full list of the files in the referenced directory.


 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page