youknowwho4eva Posted November 19, 2008 Share Posted November 19, 2008 I'm just wondering if this is possible. I want to put a program on a network pc, that when someone adds a file or modifies a file it pops up a message on their screen that says such and such has been added to the network drive. It will be allowed to be on this drive for so many days. If it is not modified or removed by such date, it will be removed. Here's the kicker. I don't want an external program on their computer. What I'm thinking is if it's possible it would be by getting their ip and somehow sending them a message that way. If all else fails I can always make the computer email them. Giggity Link to comment Share on other sites More sharing options...
November Posted November 19, 2008 Share Posted November 19, 2008 (edited) I'm just wondering if this is possible. I want to put a program on a network pc, that when someone adds a file or modifies a file it pops up a message on their screen that says such and such has been added to the network drive. It will be allowed to be on this drive for so many days. If it is not modified or removed by such date, it will be removed. Here's the kicker. I don't want an external program on their computer. What I'm thinking is if it's possible it would be by getting their ip and somehow sending them a message that way. If all else fails I can always make the computer email them.Hi there, Sometime ago i wrote this script and i never finished, it can be a start expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: November Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ;Includes #include <file.au3> #include <array.au3> ;Strings Dim $lastscan, $teste, $text, $listcurrentfiles $status = "" $text = "" $teste = 0 $sharepath = "\\server\folder" $tempdir = @TempDir & "\check.lfu" $errorfla = "No error" $checktempfile = FileExists($tempdir) Select case $checktempfile = 1 ;TrayTip ("Error", "File exists : " & $tempdir, 5) Scandif() case $checktempfile = 0 ;TrayTip ("Error", "File not exists : " & $tempdir, 5) TrayTip("Scanning", "Reading files. Fist use or support file deleted.", 5) _FileCreate($tempdir) listfiles() EndSelect func listfiles() $listcurrentfiles = _FileListToArray($sharepath) if @error Then Select case @error = 1 $errorfla = "Error 1 : Path not found." Case @error = 4 $errorfla = "Error 4 : No files found in path." EndSelect TrayTip ("Error", $errorfla, 5) else _FileWriteFromArray($tempdir, $listcurrentfiles, 1, 0) ;MsgBox(0, "teste", $tempdir) sleep(5000) EndIf EndFunc func Scandif() $listcurrentfiles = _FileListToArray($sharepath) _FileReadToArray($tempdir, $lastscan) $lenghtSaved = UBound ($lastscan) $lenghtNow = UBound ($listcurrentfiles) ConsoleWrite("Saved : " & $lenghtSaved & " | " & "Current : " & $lenghtNow & @CRLF) Select case $lenghtNow >= $lenghtSaved Normal() Case $lenghtSaved > $lenghtNow Reverse() EndSelect ;File compare EndFunc func normal() _FileReadToArray($tempdir, $lastscan) _ArrayDelete($lastscan, 0) $listcurrentfiles = _FileListToArray($sharepath) _ArrayDelete($listcurrentfiles, 0) $limit = UBound($lastscan) -1 for $x = 0 to $limit $temparraydelete = _ArraySearch($listcurrentfiles, $lastscan[$x]) Select case $temparraydelete = -1 ;MsgBox(64, "error", "Array Error : " & @error) case $temparraydelete >= 0 _ArrayDelete($listcurrentfiles, $temparraydelete) EndSelect Next $status = "Normal" end() EndFunc func Reverse() _FileReadToArray($tempdir, $lastscan) _ArrayDelete($lastscan, 0) $listcurrentfiles = _FileListToArray($sharepath) _ArrayDelete($listcurrentfiles, 0) $limit = UBound($listcurrentfiles) -1 for $x = 0 to $limit $temparraydelete = _ArraySearch($lastscan, $listcurrentfiles[$x]) Select case $temparraydelete = -1 ;MsgBox(64, "error", "Array Error : " & @error) case $temparraydelete >= 0 _ArrayDelete($lastscan, $temparraydelete) EndSelect Next $status = "Reverse" end() EndFunc func end() Select case $status = "Normal" $teste = UBound($listcurrentfiles) if $teste > 0 Then $diff = 1 Else $teste = 0 $text = "No Changes" EndIf For $y = 0 to $teste -1 $text = $text & $listcurrentfiles[$y] & @CRLF Next case $status = "Reverse" $teste = UBound($lastscan) if $teste > 0 Then $diff = 1 Else $teste = 0 $text = "No Changes" EndIf For $y = 0 to $teste -1 $text = $text & $lastscan[$y] & @CRLF Next EndSelect TrayTip("Changes", "Changes: " & $teste & @CRLF & @crlf & $text, 10) FileWrite(@TempDir & "\changes.lfu",@MDAY & "/" & @MON & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & @CRLF & @CRLF) FileWrite(@TempDir & "\changes.lfu","Changes : " & $teste & @CRLF & @CRLF & $text & @CRLF) FileWrite(@TempDir & "\changes.lfu","End of log for date above" & @CRLF) $listcurrentfiles = _FileListToArray($sharepath) _FileWriteFromArray($tempdir, $listcurrentfiles, 1, 0) Sleep(10000) EndFunc P.S. - It's probable that contains errors in the script... i never finished Cheers Edited November 19, 2008 by november Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 19, 2008 Author Share Posted November 19, 2008 If I'm not mistaken this would have to be on their computer. I only want the program to be on the networked computer that they are accessing. Something like maybe $i = 0 While 1 $search = FileFindFirstFile("*.*") Do $files = FileFindNextFile($search) $i += 1 $time = FileGetTime($files) If $time[2] = @MDAY and $time[4] = @MIN Then $file[$i] = $files Else $file[$i] = 0 EndIf Until @error $arraysize = UBound($file) - 1 For $r = 1 to $arraysize If $file[$r] = 0 Then Else Some tcp get ip address of creator thing send message I want to Send EndIf Next Giggity Link to comment Share on other sites More sharing options...
FireFox Posted November 19, 2008 Share Posted November 19, 2008 (edited) Sending file to network computer ? http://www.autoitscript.com/forum/index.ph...ic=46341&hltry this too http://www.autoitscript.com/forum/index.ph...amp;hl=TCP+file Edited November 19, 2008 by FireFox Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 19, 2008 Author Share Posted November 19, 2008 (edited) Thanks firefox, I'll check them out. Is that angry Mcain? Edit: I looked at both, but they both require a program being on the individual pc's. Guess I'll have to just email them. As soon as I find out how to get the modified by. Edited November 19, 2008 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
FireFox Posted November 19, 2008 Share Posted November 19, 2008 Thanks firefox, I'll check them out. Is that angry Mcain?Edit: I looked at both, but they both require a program being on the individual pc's. Guess I'll have to just email them. As soon as I find out how to get the modified by.For send anything to other computer, you have to connect to a program wich have same port over TCP or UDP....anyway with this script you can easy send file or message because i did it Link to comment Share on other sites More sharing options...
AoRaToS Posted November 19, 2008 Share Posted November 19, 2008 You can probably use net send but the message will b formatted in some way like: PC1 to PC2: A file was added to drive D: try searching for net send which can be used in windows without having something installed, you just need the messaging service running.Also try it in a cmd to send some text s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
BinaryBrother Posted November 19, 2008 Share Posted November 19, 2008 (edited) You can probably use net send but the message will b formatted in some way like: PC1 to PC2: A file was added to drive D: try searching for net send which can be used in windows without having something installed, you just need the messaging service running.Also try it in a cmd to send some text Ah, you kill me AoRaToS... I SO wanted to be the first to remember netsend... Oh well, I'll be more detailed! ;P Cheap I know... but it works... The 'messenger' service must be running within XP for this to work. I looked around for a bit, and Vista appears to have removed this Legacy function... lol $i = 0 While 1 $search = FileFindFirstFile("*.*") Do $files = FileFindNextFile($search) $i += 1 $time = FileGetTime($files) If $time[2] = @MDAY and $time[4] = @MIN Then $file[$i] = $files Else $file[$i] = 0 EndIf Until @error $arraysize = UBound($file) - 1 For $r = 1 to $arraysize If $file[$r] = 0 Then Else ShellExecute("Net Send * File " & $FileName & " has been modified") EndIf Next Edited November 19, 2008 by BinaryBrother SIGNATURE_0X800007D NOT FOUND Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now