1.

Solve : batch file to find all the .exe ,mp3,msi files and list the path such file?

Answer»

this is again creating the file on my desktop

just use the full path >>"\\server\share\file.log"

Try this after changing the ip address/server and folder.

Quote from: Aditi GUPTA on June 02, 2014, 04:25:24 AM

@echo off
set "host=\\xx.xx.xx.xx\folder\%COMPUTERNAME%.txt"
echo %host%
for %%a in (c d e f g h i) do if exist "%%a:\" (
dir /b /s /a-d "%%a:\*.exe" "%%a:\*.mp3" "%%a:\*.msi" |find /v /i "c:\program files\" |find /v /i "c:\programdata\"|find /v /i "c:\windows\" >>"%host%"
)
echo "Scanning Completed!!" >> "%host%"
pause
awsome, thanks a lot foxidrive.

you are genius.

Squashman - hand holding, right?Quote from: Aditi gupta on June 02, 2014, 04:25:24 AM

"%host%.txt" >> net use N: \\xx.xx.xx.xx\folder\
This is not valid syntax and please use Bulletin Board Code tags when posting code.

In your original questions it sounded like you wanted to redirect the output from the code directly to the network share. Now it looks like you want to copy a file to the network share. If you want to copy the file to the network share then use the COPY or XCOPY COMMANDS. I believe both of them SUPPORT UNC paths.Quote from: Aditi gupta on June 02, 2014, 05:42:03 AM
awsome, thanks a lot foxidrive.

you are genius.
Yes. It is Rocket Surgery.Quote from: foxidrive on May 27, 2014, 05:15:06 AM
Code: [Select]@echo off
for %%a in (d e f g h i J k l) do if exist "%%a:\" dir /b /s /a-d "%%a:\*.exe" "%%a:\*.mp3" "%%a:\*.msi" >>"%userprofile%\desktop\results.txt"

Hello, Im trying to figure out how to make a bat file and it would ask me what song if like to search for then if I have it to say I have it and if not the to seach it on say youtube automatically
Something like
@Echo off
title Song search
Echo What song would you like to seach today?
Enter name
*Search the name* if not FOUND play the song in youtube

Please help and thank you





Discussion

No Comment Found