how to prevent overwrite in xcopy command
I am excuting xcopy command in ipl to copy dcrs from a folder to teamsite
I do not want to overwrite the dcrs if it already exist in team site
in xcopy command /U is used to overwite the existing files
is there anything which will do exactly opposite of that? /-U does not work
pls can anybody reply as soon as possible?
thanks in advance
I do not want to overwrite the dcrs if it already exist in team site
in xcopy command /U is used to overwite the existing files
is there anything which will do exactly opposite of that? /-U does not work
pls can anybody reply as soon as possible?
thanks in advance
0
Comments
-
Which OS you are using?I am excuting xcopy command in ipl to copy dcrs from a folder to teamsite
I do not want to overwrite the dcrs if it already exist in team site
in xcopy command /U is used to overwite the existing files
is there anything which will do exactly opposite of that? /-U does not work
pls can anybody reply as soon as possible?
thanks in advance
In Windows 2000, /-Y will prompt to confirm before overwriting a file...0 -
There is a way to accomplish what you are asking for. The secret is to play with the attribute parameter (/M). You need to set X-copy to only copy the files that have the archive attribute and set the attribute to off once the files are copied.I am excuting xcopy command in ipl to copy dcrs from a folder to teamsite
I do not want to overwrite the dcrs if it already exist in team site
in xcopy command /U is used to overwite the existing files
is there anything which will do exactly opposite of that? /-U does not work
pls can anybody reply as soon as possible?
thanks in advance
So, when you 1st copy your files all the A-Archive attribute will be turned off. New files and modified files will automatically have the A-Archive attribute ON. Next time you run the same command only these files will be copied.
Hope that helps.0 -
Alternatively, write the entire thing in Perl and you can do whatever you want with regard to testing the status of existing files before copying over other files (or directories) - it's not really that difficult a thing to do - and a good exercise if you want to improve your Perl skills....There is a way to accomplish what you are asking for. The secret is to play with the attribute parameter (/M). You need to set X-copy to only copy the files that have the archive attribute and set the attribute to off once the files are copied.
So, when you 1st copy your files all the A-Archive attribute will be turned off. New files and modified files will automatically have the A-Archive attribute ON. Next time you run the same command only these files will be copied.
Hope that helps.0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 150 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 184 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.