Search found 9 matches

by lgt
02 Sep 2015 10:38
Forum: DOS Batch Forum
Topic: Delete files in destination that are not in source
Replies: 9
Views: 6030

Re: Delete files in destination that are not in source

It's not that I didn't like your idea of excluding the attachments folder it's that I'm not sure how to incorporate it into my current batch file.
by lgt
01 Sep 2015 10:57
Forum: DOS Batch Forum
Topic: Delete files in destination that are not in source
Replies: 9
Views: 6030

Re: Delete files in destination that are not in source

I'm trying to run this but I'm getting Error 267, "The directory name is invalid". set "DevPotableWaterProjects=\\owd-fp1\facilitybook\Projects\Leonel\infraMAP\Inspection\Public Services New\DevPotable Water Projects" for /r "%DevPotableWaterProjects%" %%a in ("*MT...
by lgt
31 Aug 2015 15:29
Forum: DOS Batch Forum
Topic: Delete files in destination that are not in source
Replies: 9
Views: 6030

Re: Delete files in destination that are not in source

This is my folder structure: Project Folder -Documents -Attachments I have many project folders in the same directory. I need to be able to go through each folder and delete anything in the "Documents" folder that is not in the source folder. I only need to do this for the "Documents&...
by lgt
27 Aug 2015 21:55
Forum: DOS Batch Forum
Topic: Delete files in destination that are not in source
Replies: 9
Views: 6030

Re: Delete files in destination that are not in source

Your code worked when run as is but the problem I'm having is incorporating robocopy into my batch file, it's not working for me. I need a way to delete files that are no longer in the source folder while keeping the logic of my current script. I managed a workaround by first deleting the folder and...
by lgt
27 Aug 2015 15:40
Forum: DOS Batch Forum
Topic: Delete files in destination that are not in source
Replies: 9
Views: 6030

Delete files in destination that are not in source

I have the following batch file that works. What I'm trying to do now is to delete files in the Documents folder that are not in the source folder. I can't seem to be able to do it. I tried robocopy with the mir option but it is not working. I'm hoping somebody will be able to help. Thanks. @echo Fo...
by lgt
09 Dec 2014 16:46
Forum: DOS Batch Forum
Topic: Batch file to create folder and subfolders and copy files
Replies: 4
Views: 5016

Re: Batch file to create folder and subfolders and copy file

Figured out my last question. Am able to copy just new or modified files by using xcopy instead of copy and /s /d /y. Thanks!
by lgt
09 Dec 2014 15:52
Forum: DOS Batch Forum
Topic: Batch file to create folder and subfolders and copy files
Replies: 4
Views: 5016

Re: Batch file to create folder and subfolders and copy file

I noticed that the batch file is copying all the files every time it is run. Could it be possible to only copy new or modified files?
by lgt
09 Dec 2014 09:27
Forum: DOS Batch Forum
Topic: Batch file to create folder and subfolders and copy files
Replies: 4
Views: 5016

Re: Batch file to create folder and subfolders and copy file

That worked great! That's exactly what I needed. Thank you!
by lgt
08 Dec 2014 17:25
Forum: DOS Batch Forum
Topic: Batch file to create folder and subfolders and copy files
Replies: 4
Views: 5016

Batch file to create folder and subfolders and copy files

I have multiple project folders that contain files. The folders are named by their project id. I need to copy any pdf files that contain the word "approved" to a new folder. Below is an example. Copy from here: C:\Projects\Project_1\*Approved*.pdf To here: C:\Attachments\Project_1\Document...