Sending Files/Shortcuts To Recycle Bin
Hello Everyone!
I would like to know if there's any coding to delete all files/shortcuts in a folder temporarily (i.e. sending to recycle bin), when you don't know the name of files.
During the running of my program i am saving certain data in files and making shortcuts in a folder, but once the form is closed i'd like to delete all the files and provide the user a feature to delete those shortcuts if they want to.
And there's one more thing i would like to know.......how can i restore files from recycle bin? Its not related to the program but its just another thing i would like to keep in mind.
Nd I'm A Beginner in Visual Basic and using VB 6.0 at the moment.
Thanks in advance!
I really appreciate it!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Sending Files To The Recycle Bin?!?!?
Hey guys... i am stuck trying to creat a command or searching for one which will be able to send any file to the recycle bin.. from what i learned the recycle bin is some kind of virtual file... but i dont understand the concept given in the MSDN library about it.. i wounder if there is a built in function or do i need to create it... and if i have to create it.. what do i need to know... for such operation???
Deleting Files To The Recycle Bin
Hey There,
Is there a way with VB6 to delete Files to the Recycle Bin?
I have found documentation for .Net but not VB6.
Anyone have any ideas?
Thanks in advance.
Restoring Recycle Bin Files From VB
Simple question that I cant figure out --
How to restore ALL recycle bin items from VB code.
Thanks all.
BaLLZaCH
ballzach@ballzach.com
VB5 and VB6
Restoring Files From XP Recycle Bin
I have the code to restore files from the Windows 98 bin but with XP/2000 the system appears not to store the files in the same way. I can read the file info for NTFS files stored in the bin and use this to list the files but cannot find a way of restoring the files themselves.
Delete Files To Recycle Bin
I have been using the kill command to delete files but would like to have them available in the recycle bin. I found code
public Sub RemoveFile(FileName as string)
Dim SHop as SHFILEOPSTRUCT
Dim strFile as string
strFile = FileName
With SHop
.wFunc = FO_DELETE
.pFrom = strFile
.fFlags = FOF_ALLOWUNDO
End With
SHFileOperation SHop
End Sub
which is supposed to do the job. However, it only deletes the file with no copy in the recycle bin. What am I missing?
Retrieve Deleted Files Even From Recycle Bin
Hi Guys,
I have accidently deleted some of my important files from Hard Disk and they are not even in Recycle Bin(as i deleted with Shift+Delete). I know there are a lot of softwares in market to retrieve these files but they are not free to use. I want to know that is there any way in VB to find and restore such deleted files. please reply me as i am in a great need.
Thanks in advance
.lnk Files (shortcuts)
I am using Installshield (i think its 3.x as is on diff comp and too lazy to check ) and it allows u to create shortcuts that appear on the desktop and program menu.
This is all well and good except that:
1. the created lnk file should normally allow the user to edit the target, shortcut key, icon etc if they rightclick on the desktop icon, select properties and select the shortcut tab.
2. the version created thru installshield disables (greys) all entries and command buttons on the shortcut tab of the properties form as per the example pic.
Anyone know why this is happening and how to fix it 'within' Installshield? As far as i can see IS doesnt give u access to the scripts .. so i dunno if can be fixed there.
Thanks
How To Make Shortcuts Of Files In Windows
I would like to be able to create shortcuts to different files in windows with VB. Is there a way to do this through VB itself, or does it have to be done through a shell script?
I Mean ASSOCIATE Files With Programs... Not Create Shortcuts
Not creating shortcuts... I mean ASSOCIATE... Like when you click on a ZIP file, it opens with WinZip... Or when you click on a DOC file, it opens with Word, or a WPD opens with WordPerfect. That's what I mean. How do I do this from within my program?
Extracting Text From Lines In Files - And Opening .url Shortcuts
Ok, using vb6 I am trying to Open a .url file with my program. I dont know how to "load" the file into the browser window like you would say a text document into a RTF ,,,
Or, i thought, if I loaded the .url as text and pulled out the http:// from some type of ini command, and simply "navigate" the text output.
(To explain the .url shortcut, it basically has a section named [internet shortcut] and then an intry called url= and then the HTTP name. I would need to output the text after the url= part)
So how could I either load a .url shortcut into the app, or pull the text out of the .url ? Is there another way ? Please help :-)
Thank you very much for your time, as Your efforts have built the modern computing world. Sincerly,
BaLLZaCH
2 Questions - Checking Files Size, And Sending Files
1. How do i check the exect size of an exe file? i need it in bytes.
2. Is it possible to send files throught winsock without worring about data that might get lost on the way, and without burden too much on the internet? If not, whats the best way to do it? (I need to transport files from server to multiply clients for program updates).
Thanks ^^
Sending Files To FTP
How can I send a text file to a FTP account if the host was "www.0catch.com" and it required a username and password? Sample code is appreciated.
Sending Files
hey, how would i go about sending a file to another computer by using its ip address?
Sending Files
I was wondering how to send a picture via a messenger... and How would i get it so it would warn them that it is a file not just normal text...and have it underlined blue so that they click on it and then it opens up...?? (I am using winsock)
Sending Files
aight.. i send the file and it works fine.. but if i try to send another file rite after its complete it will only send the first 1 or 2 chunks then stop... i have to reopen the form to send again..can someone figure out y?
heres what im using:
Code:
Private Sub SendNextChunk()
'
Dim hFile As Long
Dim lngChunkSize As Long
Dim strData As String
On Error Resume Next
lngChunkSize = LOF(hFile) + 1 - lngFilePos
'lngChunkSize = LOF(hFile) + 1 - lngFilePos
' If we're not currently connected and transferring, exit. This shouldn't
' happen, but just in case...
If (Not blnTransferring) Then Exit Sub
'
' Open the file that we're sending, for BINARY mode. This means that we can
' read out bits regardless of what's in the file (text, image, music etc..).
hFile = FreeFile
Open strFilename For Binary As #hFile
'
' We need to read the next unsent piece of the file, so move through the
' file past all the bits we've already sent. Then, when we read into
' strData, the data will be the next consecutive bytes.
If (lngFilePos = 0) Then lngFilePos = 1
Seek hFile, lngFilePos
'
' Work out how large this chunk is going to be. Normally, it will be the
' standard CHUNK_SIZE, but if the last piece is less than that, decrease it.
lngChunkSize = LOF(hFile) + 1 - lngFilePos
If (lngChunkSize > CHUNK_SIZE) Then lngChunkSize = CHUNK_SIZE
'
' If the chunksize was 0, it means there's no data left to send, so our
' transfer is complete.
If (lngChunkSize = 0) Then
'
' Send the EOF marker so the remote host knows that's all the data.
strData = "EOF"
blnTransferring = False
Call lstEvents.AddItem("0 bytes, transfer completed. Sending EOF.")
'
' Send the data to the remote host.
Call tcpServer.SendData(strData)
DoEvents
'
Else
'
' Grab the data from the file, and increment our file pointer so that next
' time we read, we are reading the next piece of the file.
strData = String$(lngChunkSize, 0)
Get #hFile, , strData
lngFilePos = lngFilePos + lngChunkSize
'
' Send the data to the remote host.
Call tcpServer.SendData(strData)
Call lstEvents.AddItem("Sent " & lngChunkSize & " bytes")
DoEvents
'
End If
'
Close #hFile
'
End Sub
Sending Files To FTP
I am currently trying to take a file and send it to an ftp. The code I am using looks like it should work, but if any of you know why it isn't, a response would be very beneficial.
itt1.UserName = "jason"
itt1.Password = "bobo1"
itt1.Execute "FTP://65.89.79.75", "DIR /*"
itt1.Execute "FTP://" & ftmtechinfo.txtIP, _
"SEND c:vbjpegcalmdown.jpg /calmdown.jpg"
This FTP allows me to read and write with that login. In addition, if someone could show me the code of how to send a whole folder then, as opposed to just an individual file, I would be ecstatic.
Sending Files To FTP
If I am using an Internet Transfer Control (itt1) and I want to send a file to an FTP, what is the code that I would use?
itt1.execute "FTP://" & ftpaddress, "SEND" ??????
Ftp Sending Files
Hello,
I just started programming Visual Basic (my learning book is almost finished).
I've created a chat application. I have used the WinSock control. Everything works just fine. There is enough help on this control.
Now I'm wonndering if there is a possibility to send and receive files. Does Visual Basic have a control for this? I can't find anything about the subject in the help files.
(I can't be done by the WinSock control I believe).
Is there some kind of ftp control?
Thank in advance,
Dirk
Sending Files To LPT
I need to send some files to printers connected to LPT(1, 2, 3, ...) and COM(1, 2, 3, ...). These printers are not installed in windows, so I can only send the files straight to the ports. I have found some code in the Microsoft Knowledge Base (http://support.microsoft.com/kb/q154078/), but I suppose this only works when the printer is installed in windows. I need some similar code to send raw data to LPT and COM. Or would some API filecopy statement work? As what do I refer to the printer then (source & destination, what to use as destination? LPT1:?).
Thanks for your help here!!!
Kind regards,
Borniet
Sending Files!
Hi! and please dont be mad @ me!
I need to send file from client to server! But i search in google for axemples and thay are realy complicated and hard for me to understand!! So i try to make a simple by myself but it dosn't work! The code is exreamly stupid!
Client
Code:
Private Sub Command1_Click()
Winsock1.SendData App.Path & "code.txt"
End Sub
Private Sub Form_Load()
Winsock1.Connect "213.182.193.12", 1234
End Sub
Private Sub Winsock1_Connect()
MsgBox "connected"
End Sub
And the server:
Code:
Private Sub Form_Activate()
Winsock1.LocalPort = 1234
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strdata As String
Winsock1.GetData strdata
MsgBox Data
End Sub
i need just to send that txt file to the server! PLease if someone of you can give me wey easy example I will be realy happy ! Thanx!!
Sending Files
i use the following for sending files through a winsock
VB Code:
Public Sub SendFile(sFile As String, sSaveAs As String, tcpCtl As Winsock)On Error GoTo ErrHandler Dim sSend As String, sBuf As String Dim ifreefile As Integer Dim lRead As Long, lLen As Long, lThisRead As Long, lLastRead As Long ifreefile = FreeFile ' Open file for binary access: Open sFile For Binary Access Read As #ifreefile lLen = LOF(ifreefile) ' Loop through the file, loading it up in chunks of 64k: Do While lRead < lLen lThisRead = 65536 If lThisRead + lRead > lLen Then lThisRead = lLen - lRead End If If Not lThisRead = lLastRead Then sBuf = Space$(lThisRead) End If Get #ifreefile, , sBuf lRead = lRead + lThisRead sSend = sSend & sBuf Loop lTotal = lLen Close ifreefile bSendingFile = True '// Send the file notification tcpCtl.SendData "FILE" & sSaveAs DoEvents '// Send the file tcpCtl.SendData sSend DoEvents '// Finished tcpCtl.SendData "FILEEND" bSendingFile = False Exit SubErrHandler: MsgBox "Err " & Err & " : " & Error 'send error data to server Err and ErrorEnd Sub
VB Code:
If data = "FILEEND" Then bFileArriving = False Text9.Text = "Saving File to " & sFile sArriving = sArriving & Left$(msg, Len(msg) - 7) ifreefile = FreeFile If Dir(sFile) = "" Open sFile For Binary Access Write As #ifreefile Put #ifreefile, 1, sArriving Close #ifreefile 'ShellExecute 0, vbNullString, sFile, vbNullString, vbNullString, vbNormalFocus End If ElseIf Left$(msg, 4) = "FILE" Then bFileArriving = True sFile = Right$(msg, Len(msg) - 4) sArriving = "" ElseIf bFileArriving Then Text9.Text = "Receiving " & bytesTotal & " bytes for " & sFile & " sArriving = sArriving & msg End If
but for large files it doesnt work, anyone known of any better ways?
Sending Files
How would I go about sending files over the internet using VB? I have a small chat program type of thing and I want to allow people to send files.
Sending Files
hey all
how would i go about sending files from one comp to another over the internet?
Sending Files To CNC
Hi,
In our company we have an old cnc machine (mill) that needs a text file with program instructions to perform the work.
So far we've been using an old dos based app ProComm to send those files to it.
I'd like to create a VB app that would be able to send those files to our mill machine one at a time.
How would I go about it? Winsock?
Example would be appreciated.
Sending Files
I want to make a application like Windows Messenger. But I want
also send files with this program.
1. How can I send messages like Windows Messenger?
2. How can I send Files with this program?
I hope you can help me.
Allready thanks
Sending Files
Hi,
I have come back to an old project of mine which is a chat program, I just want to know how do i send a file between the two users?
say
texbox1 has the directory in
commandbutton1 is to send it.
tcpserver will send the file
tcp client will recieve the file
how can I do this?
and the other question is how do I have multipule users on the program? and also know who they are so I can add them to a list?
Sending Files
hello
I 'm sending a binary file using winsock. Everything was hunky doory until the server sent a string to the to client after it sent the file. If I step throught the programs one at a time the string gets there and it works fine. Though when i run it, the sequence of the data seems to go haywire. Is there any way to prevent this from happening?
Any suggestions would help
Sending Files !!!
Hallo Guys
I am very new in VB but I make my first project
it is a winsock program acting as a client and server
(chat program)
i tried it many times on the net and it works so nice
but now i want to add sending file as a new thing in it but i didn't know how to do it
i try to learn
* internet tranfer protocol (HTTP,FTP) but fail to use it to send and recived
* internet comm but failed too
i am dreamd about ake it
browse ==> select file ==> OK ==> the program send a signal to the anthor one ==> the other tell the user there is file coming where he want to save it ==> the other user browse and select new name ==> save ==> the transfere begin and can continue chating during the sending procces
i know i will use commen dialog to open and save but how that all mechanisms work
help guys
!! SORRY FOR MY ENGLISH I HOPE I MAKE IT CLEAR ENOUGH !!
Sending Files Over FTP
Hello all,
I have been trying to find some code that would send files to a server over ftp, but all I can find is expensive DLL files.
Is there a way with Windows API to send files over ftp with defined paramters?
Sending Files
I need to send a different file to each person on a list.
The list will consist of e-mail addresses and each file will start with the first part of that address.
e.g.
1st address = P1111@mydomain.com
1st file = P1111.xls
2nd address = S1234@mydomain.com
2nd file = S1234.xls
etc.
Is there a way to do this with Outlook & VB?
Sending Files
Hey, I have a chat program that I have written recently and I would like to have a send file capability within it. The Chat program uses WinSock and connects to the others IP. Also, if anyone knows how to have one person's font be a differnt color, that would be great.
Sending Files With Winsock Dll
yea i would like to know how to send files with winsock using a server/client application. if ne one could help, please do.
thanks in advance
Sending And Receiving Files...
Im wondering the commands for winsock and other things I need to use for being able to send and recive files...
Kinda like an aim dirrect connection...but with my own program.
Also if you have a basic program already made can I see your code so I can base my code off yours and see how it all works together?
Thanks in advance,
-- Paul
Sending Files Via Winsock Help
im kind of a newb, but if im correct to send a file via winsock would be done like this?
Code:
winsock1.sendata = "C:/somepicture.jpg"
not sure if that is correct, if not could i get help on this? and if yes, then how does the client receive the file so its not in text format and save it to a folder designated for it?
Code:
winsock1_ondataarrival
???
please help?
Dialing And Sending Files.
I have a program, that currently checks for a internet connection, if found, sends files over ftp, if not found, then it creates a new dun, and dials it.
The problem is..... A lot of windows 98/xp/2000 machines are using lan, and LAN overides a phone/modem connection.
So when people try to send, it doesnt create a connection.
The fix is.... run INETWIZ, and select connecting using modem.
Not such a bad problem, but when its 20% of 1000's of people, its big.
Any suggestions on a better way to send files?
I was looking into mscomm, but not sure into how it works.
ALSO, these clients, are dialing into a windows 2000 RAS server
Im really just looking for a better way to establish a connection and send files. And I want it to work on every machine, generic...
Thanks for any help.
Sending Files Question
OK I have a program where I want to send a user files when they click the Get Data command button. I want to send them all of the files in a certain directory and if they have the same named file in their directory I want vb to rename it. All the files in the sending/receiving directory are numbers from 1 onwards. These numbers are checked and stored in a variable called FileNum when the form is loaded. Any ideas on how to go about this would be much appreciated. Thanks. =D
Sending Files Without Any Programs
On download.com I found a really cool application. It claims to be able to send files over a windows 2000 (or NT, I don't really remember) network without the recipient having to download or open any programs.
I did a quick search, but couldn't find anything, but the program says to flash an icon in the system tray when a message or file arrives. I was just wondering if that is possible. It doesn't seem like it because it might pose a huge security risk...
Sending Files To A Vb Application
Hello,
I would like to know how to make my application run a certain file using the OPEN WITH.. in explorer. But I don't want my program to create an instance of itself for every file I open with my application in explorer.. Anyone know?
Thanks!
Sending Files Via Winsock
Hello,
For my client server program that I am using on my home network I have to send a file from the server to the client or vise versa.
I have been looking at the necessay code although it is quite complex.
Please could someone try and explain what this code would be like or where to find it.
I know that I have to use either a binary transfer or winsock control.
Thank you
Sending Files (Winstock)
I'm using DigiRev's Multi-User chat code that can be found here:
http://www.vbforums.com/showthread.php?t=482488
Now i want to send files between users. Is it possible to have a button where i can select a user from lstusers and then click the button to send a file then i can select the file in a browse box and it can show in the chat window the current file that is being sent to what user and show the percent complete?
Sending Files Through Modem
I have a question. Let's say to computers are in different rooms and the both have modems. Is it possible to directly hook these to computers up together? Like phone line to one computer and phoneline to the other computer. I want to do it where it is free and it can send strings to eachother. This way since the modem is able to send and receive data i want it where it can be hoocked directly up to another computer and can send and recieve small files. Is this possible?
Sending Files Through Winsock
Sending files through winsock
---
i really didnt understand how.. i did send text between server - > client
and client - > server
but files i didnt understand how,
Winsock (Sending Files)
Im using the code from CVMichael on this post http://www.vbforums.com/showthread.php?t=377648
to send files from my program to the server program.
The program was setup to send only text files, and i used that program as a patcher to update the client to the newest EXE file when i made one.
Now ive run into another problem.. Right now, all but 1 file are text files, so i was able to do this myself using CVMichael's program to send the 1 file. But i recently found out that my program now has to start sending pictures, and very very soon there will be several pictures being sent through my program so i figured i would change it up so that i would use CVMichael's code instead of mine for all files, but i got a problem..
His files will only send 1 at a time, then you have to do it again. Well i copied all the controls and code from his program and threw it into the forms i already had on my client and server. But its not working. At first only the very first file would send, then i found an error in my code and changed it and now only the last file sends. So i found that error and now NO files will send!!!
Here's my code for sending the files:
Code:
Open App.Path & "ImageList.dat" For Input As #1
Do
Input #1, CurFile
txtFileName.Text = CurFile
Select Case CurFile
Case Is = App.Path & "q.dw"
Label1.Caption = "Updating Basic Questions"
Case Is = App.Path & "JobSpec.dw"
Label1.Caption = "Updating Job Specific Questions"
Case Is = App.Path & "Prod.dw"
Label1.Caption = "Updating Products"
Case Is = App.Path & "ProdPrice.dw"
Label1.Caption = "Updating Prices"
Case Is = Environ("windir") & "systemdw.dat"
Label1.Caption = "Updating Global Settings"
Case Else
Label1.Caption = "Sending Product Images"
End Select
SendFile txtFileName.Text
Loop Until EOF(1)
Close #1
Basically my program will load up, and when the user chooses to update the server, it will load the update form, and throw all the files its going to update into ImageList.dat
Then it will run cmdConnect_Click which contains the code i just posted before this.
If you need any more code let me know, i'll post whatever... This is frustrating!
Winsock - Sending Files
Hey,
I know how to send data using winsock.. but how would I send a file?
Basically I need some way to display a progress indicator (e.g x out of x kb transfered) while sending a file from the client to the server, then the server would save the file in a certain location.
It will be mainly used for pictures so I guess I would need to read the file in binary mode, but I am only used to reading/writing text files using FSO.
Could anyone help me out a little please?
Oh, and I am not sure about this but I read somewhere that I would not be able to send the whole file in one part, I would need to split it - is this true?
Thanks,
Tom
Sending Files Over Winsock
Client connects to server.
sends request to send the file.
server opens the requested file (in binary mode?), loops through it puts it all in a variable (a byte?) then sends it to the client
client receives the byte, opens a new file as binary mode then puts that byte inside it.
Is this how it works?
<RESOLVED>Sending Files To LPT
I need to send some files to printers connected to LPT(1, 2, 3, ...) and COM(1, 2, 3, ...). These printers are not installed in windows, so I can only send the files straight to the ports. I have found some code in the Microsoft Knowledge Base (http://support.microsoft.com/kb/q154078/), but I suppose this only works when the printer is installed in windows. I need some similar code to send raw data to LPT and COM. Or would some API filecopy statement work? As what do I refer to the printer then (source & destination, what to use as destination? LPT1:?).
Thanks for your help here!!!
Kind regards,
Borniet
|