Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch File to find directory and co
Name: Inferi0r Date: August 18, 2007 at 15:15:35 Pacific OS: Windows XP Pro CPU/Ram: 1,8Ghz - 512MB Product: HP
Comment:
Hello,
I'm making a batch that can automatically update my WindowsDefender executable.
The following must happened: Copy all files from the directory "%AllUsersProfile%\Application Data\Microsoft\Windows Defender\Definition Updates\{*}" To the subdirectory "Updates" of the place where the bat file is running. (that place is always changing, also changing drives)
Note: there are a few directories in the "%AllUsersProfile%\Application Data\Microsoft\Windows Defender\Definition Updates\" folder, but not with names which starts and end with '{' and '}'/
Name: Inferi0r Date: August 18, 2007 at 17:27:16 Pacific
Reply:
I was looking for a FOR command because there is a wildcard in the foldername not in the filename. This would be the good command: "%AllUsersProfile%\Application Data\Microsoft\Windows Defender\Definition Updates\{BDE4294C-01A6-464C-A790-D4EE5B6F7AEA}\*.*"
But {BDE4294C-01A6-464C-A790-D4EE5B6F7AEA} is always changing. And 'FOR /F %%i IN ('DIR /B /A-D "%AllUsersProfile%\Application Data\Microsoft\Windows Defender\Definition Updates\*"') COPY "%AllUsersProfile%\Application Data\Microsoft\Windows Defender\Definition Updates\%%i\*" "Updates"' isn't working because there are more folders in the 'Definition Updates' directory.
Thanks
0
Response Number 3
Name: Razor2.3 Date: August 20, 2007 at 17:50:51 Pacific
Reply:
No, it's not working because DIR /A-D gives you everything that's NOT a directory.
DIR /AD would give you everything that IS a directory.
Summary: So I have an odd problem, and a less than easy way of doing it. Our organization has some house keeping that needs to be done, and I would like to use a batch file to aquire ip adress, hostname and dn...
Summary: Hello, I am new at this and I have to create a batch file to find a set of filenames with all the path like C:\Users\pc\Documents\ok.txt, etc. The batch file must say if they exist or not. It seems t...
Summary: Hi, I currently have a batch file thats creates a new directory with the current date as its name (in the format YYYYMMDD). Is it possible to have another batch file that finds this directory and copi...