/build/static/layout/Breadcrumb_cap_w.png

Search a file in C:\ and if exist search some other files in C:\

This, i want to search in C:\ if a file exist.

if its exist then search in c:\ other files and upload them to a network folder.

anyone have some tips on how to do this?

any help its greatly apreciated


0 Comments   [ + ] Show comments

Answers (1)

Posted by: SMal.tmcc 4 years ago
Red Belt
1

I need more detail on the files you want to copy. Do the files you want to copy have any commonalities such as are they all in one folder, same extension, etc.

What target do you want? Does each source need to go to a unique target?  IE same subdir or do you need a unique subdir for each source.


the basic line is this

if exist C:\somefile.log (xcopy C:\ProgramData\Quest\KACE\*.gz c:\temp /q /y)

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ