ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Move specific file types with original folder path included to another directory

(1/3) > >>

questorfla:
I need to move all files of specific file-types from Folder A to Folder B and put them under the same path as they existed in A.  I need to do this on several filetypes but only one type at a time.  If the folder-path already exists in B, the file would just be added to it.  If it doesn't exist, the script would create it during the move.  It might be possible to do this with the right switches using Robocopy but I cant seem to find the right combintion of switches to work as needed.   The script needs to delete the files as they are moved to the new folder (Move insted of copy)
 
If there is a better program for doing this, I would be happy to use it.   I am hoping to be able to delete folder A when done as it should only contain 'trash'.  And folder B would contain only the file-types I need to keep with each in its original folder path.

wraith808:
Are you open to a pay solution?  I use Syncovery, and it can do exactly what you're saying.

questorfla:
"Are you open to a pay solution?  I use Syncovery, and it can do exactly what you're saying."   Thanks Wraith!

Good to see some many of the Oldtimers are still here.  Happy Holidays to ALL!    I don’t mind paying for it my Chri$tma$ present to the board will be going out soon as well   I assume the mfr. has a demo or trial so I can be certain before buying it can do what is needed.  The place I work has got to have some of the  WORST people i have ever run across in all my years in IT.  Most places would be GLAD to have someone tell the employees how to do what will work and NOT do what won't.  I swear they always try what WON'T first in an effort to prove me wrong.   They are so bad I don’t even know if I can feel sorry for them  Every joke you have EVERY read in a "IT repair manual giving real life examples  This is where they com from!  A disaster almost occurred the other day because someone could not find the "ANY" key in a new program we just bought.  As in press ANY KEY to continue?  She stopped evertything to file an Urgent Trouble Ticket an waited for me to get there   It took me a couple of minutes to get enough self-control to explain. They thought they had an "outdated keyboard" that was missing important keys.  Just like the (now Unlabeled)  START on Desktop or the mysterious Windows Key. 

I can see it is time for Computer-KLASS -01)

Back to the question though.  Just for my own knowledge , I thought this was an exact described example in Robocopy but i cannot find it now so I am glad to know therre IS a way out.
Will let you know you how Syncovery workes out

PS:  Update I FINALLY got Robocopy to work :)  perfectly at that.  I have been told that I can even shorten this but here is the Working Script to create an empty copy of a dir with only all paths



--- ---robocopy.exe /R:0 /W:0 "C:\SCRIPTS\A" "C:\SCRIPTS\B" /E /Z /Copy:DT /XF "*.???" /LOG:"C:\SCRIPTS\EMPTY.LOG" where A is the original folder and B is the exact copy with no files in it
At this stage I alwasy add a pause when trying things i dont know for sure but all ran well and the log said no errors


Merry Christmas!

wraith808:
PS:  Update I FINALLY got Robocopy to work   perfectly at that.  I have been told that I can even shorten this but here is the Working Script to create an empty copy of a dir with only all paths


--- Code: Text ---robocopy.exe /R:0 /W:0 "C:\SCRIPTS\A" "C:\SCRIPTS\B" /E /Z /Copy:DT /XF "*.???" /LOG:"C:\SCRIPTS\EMPTY.LOG"
where A is the original folder and B is the exact copy with no files in it
At this stage I alwasy add a pause when trying things i dont know for sure but all ran well and the log said no errors

Merry Christmas!

-questorfla (December 16, 2018, 12:34 AM)
--- End quote ---

Merry Christmas to you too... and good job on the implementation!   :Thmbsup:  I use robocopy at work for a variety of tasks, but just rather kick back with Syncovery at home :)

questorfla:
Wraith, I finally had time to test syncovery and it does work as advertised.  :)  The robocopy script I came up with does about half the job.  I will probably buy Syncovery abecasue it is the most well thought-out process I have seen for some time.   I can see where it (especially the schreduling part!) would be GREAT to have.  I might use it for what I need now as well -  if i can't get the robocopy switches in the correct order to work properly.  So far it does create the empty directory but i cant get it to move specific files.    I was hoping to find a simple way to manage this one task and feel Syncovery is almost like using a Shotgun to kill a fly  :). 
Still, as you say, i think it will do the trick after i run a couple more tests so i am sure i know what is going on.  I can see many uses for it on much larger tasks i have to perform daily. 

Navigation

[0] Message Index

[#] Next page

Go to full version