Datei ausschneiden ohne Drag&Drop?

Zeller

Mitglied
Hilfe!!Datei ausschneiden ohne Drag&Drop?

Hallöchen

Bitte um Sofort-Hilfe. Ich muss nächsten Dienstag mein Projekt abliefern.

Ich suche eine Variante wie ich eine Datei deren Pfad ich habe ausschneiden kann.
Copy hab ich hingekriegt, doch damit scheint es nicht zu klappen.
Nach MSDN muss es recht einfach sein?:-(

Danke für eure Mithilfe
 
Zuletzt bearbeitet:
Die Datei sollte erst gelöscht werden nachdem eingefügt worden ist.

Und dies geschiet im Explorer oder ähnlichem.
 
moin


Gib doch mal ein wenig mehr Informationen!
Welche Art Programm?

Warum lädst du die Datei nicht schnell in eine Variable und löscht sie dann?
Oder du lädst die Datei erst in die Zwischenablage.

Nach MSDN muss es recht einfach sein?
Ja, was denn?


mfg
umbrasaxum
 
Ich arbeite an einer art Dateisuchprogramm.
Es soll Computeranfängern helfen "verlorene" Dateien zu finden.(ähnlich wie Suchen von Windows)
Wenn man die gewünschte Datei gefunden hat, kann man sie öffnen,kopieren,umbenennen,löschen und sollte sie eben auch ausschneiden können der rest klappt.
Ich kopiere die Datei schon mit CopyToClipboard.
Doch ich kriegs nicht hin die Datei nach dem Pasten z.B im Explorer zu löschen, da ich mit dem CopyToClipoard die Datei kmplett in die Hände von Windows lege und nicht mitbekomme, wann sie Eingefügt wird.
Ich dacht mir, dass man die ClipboardDaten irgendwie ändern könnte um Windows die info zu geben damit die Ursprungsdatei nach dem Einfügen gelöschd wird doch ich konnte das nicht.
Ist das so möglich?
Gruss Zeller
 
moin


Dann nutz doch einfach die WinApi Funktionen der Plattform SDK.
In der MSDN findest du eine Auflistung mit genauer Beschreibung unter dem Begriff "File Management Functions".
Hier mal schnell eine Auflistung:
File Management Functions

The following functions are used in file management.

Function Description
AreFileApisANSI Determines whether the file I/O functions are using the ANSI or OEM character set code page.
CheckNameLegalDOS8Dot3 Determines whether the specified name can be used to create a file on the FAT file system.
CloseHandle Closes an open object handle.
CopyFile Copies an existing file to a new file.
CopyFileEx Copies an existing file to a new file.
CopyProgressRoutine An application-defined callback function used with CopyFileEx and MoveFileWithProgress.
CreateFile Creates or opens a file system object.
CreateHardLink Establishes an NTFS hard link between an existing file and a new file.
DeleteFile Deletes an existing file.
FindClose Closes the specified search handle.
FindFirstFile Searches a directory for a file whose name matches the specified file name.
FindFirstFileEx Searches a directory for a file whose name and attributes match those specified.
FindFirstStreamW Enumerates the first stream in the specified file.
FindNextFile Continues a file search.
FindNextStreamW Continues a stream search.
GetBinaryType Determines whether a file is executable.
GetCompressedFileSize Retrieves the actual number of bytes of disk storage used to store a specified file.
GetFileAttributes Retrieves attributes for a specified file or directory.
GetFileAttributesEx Retrieves attributes for a specified file or directory.
GetFileInformationByHandle Retrieves file information for a specified file.
GetFileSize Retrieves the size of a specified file.
GetFileSizeEx Retrieves the size of a specified file.
GetFileTime Retrieves the date and time that a file was created, last accessed, and last modified.
GetFileType Retrieves the file type of the specified file.
GetFullPathName Retrieves the full path and file name of a specified file.
GetLongPathName Converts the specified path to its long form.
GetShortPathName Retrieves the short path form of a specified input path.
GetTempFileName Creates a name for a temporary file.
GetTempPath Retrieves the path of the directory designated for temporary files.
MoveFile Moves an existing file or a directory.
MoveFileEx Moves an existing file or a directory.
MoveFileWithProgress Moves a file or directory.
ReOpenFile Reopens the specified file system object with different access rights, sharing mode, and flags.
ReplaceFile Replaces one file with another file.
SearchPath Searches for the specified file.
SetFileApisToANSI Causes the file I/O functions to use the ANSI character set code page.
SetFileApisToOEM Causes the file I/O functions to use the OEM character set code page.
SetFileAttributes Sets a file's attributes.
SetFileSecurity Sets the security of a file or directory object.
SetFileShortName Sets the short name for the specified file.
SetFileTime Sets the date and time that a file was created, last accessed, or last modified.
SetFileValidData Sets the valid data length of the specified file.


The following functions are used with file I/O.

Function Description
CancelIo Cancels all pending I/O operations that were issued by the calling thread for the specified file handle.
CreateIoCompletionPort Associates an I/O completion port with one or more file handles.
FileIOCompletionRoutine An application-defined callback function used with ReadFileEx and WriteFileEx.
FlushFileBuffers Clears the buffers for the specified file and causes all buffered data to be written to the file.
GetQueuedCompletionStatus Attempts to dequeue an I/O completion packet from a specified I/O completion port.
LockFile Locks a region in an open file.
LockFileEx Locks a region in an open file for shared or exclusive access.
PostQueuedCompletionStatus Posts an I/O completion packet to an I/O completion port.
ReadFile Reads data from a file, starting at the specified position.
ReadFileEx Reads data from a file asynchronously.
ReadFileScatter Reads data from a file and stores the data into a set of buffers.
SetEndOfFile Moves the end-of-file position for the specified file.
SetFilePointer Moves the file pointer of an open file.
SetFilePointerEx Moves the file pointer of an open file.
UnlockFile Unlocks a previously locked region in an open file.
UnlockFileEx Unlocks a previously locked region in an open file.
WriteFile Writes data to a file.
WriteFileEx Writes data to a file asynchronously.
WriteFileGather Gathers data from a set of buffers and writes the data to a file.

The following functions are used with file mapping.

Function Description
CreateFileMapping Creates or opens a named or unnamed file mapping object for the specified file.
FlushViewOfFile Writes to the disk a byte range within a mapped view of a file.
MapViewOfFile Maps a view of a file into the address space of the calling process.
MapViewOfFileEx Maps a view of a file into the address space of the calling process.
OpenFileMapping Opens a named file mapping object.
UnmapViewOfFile Unmaps a mapped view of a file from the calling process's address space.

The following functions are used with the encrypted file system.

Function Description
AddUsersToEncryptedFile Adds user keys to a specified encrypted file.
DecryptFile Decrypts an encrypted file or directory.
DuplicateEncryptionInfoFile Copies the EFS metadata from one file or directory to another.
EncryptFile Encrypts a file or directory.
EncryptionDisable Disables or enables encryption of the indicated directory and the files in it.
FileEncryptionStatus Retrieves the encryption status of the specified file.
FreeEncryptionCertificateHashList Frees a certificate hash list.
QueryRecoveryAgentsOnEncryptedFile Retrieves a list of recovery agents for the specified file.
QueryUsersOnEncryptedFile Retrieves a list of users for the specified file.
RemoveUsersFromEncryptedFile Removes specified certificate hashes from a specified file.
SetUserFileEncryptionKey Sets the user's current key to the specified certificate.

The following functions are used to decompress files that were compressed by the compressed by the Lempel-Ziv algorithm.

Function Description
GetExpandedName Retrieves the original name of a compressed file.
LZClose Closes a file that was opened by using LZOpenFile.
LZCopy Copies a source file to a destination file.
LZInit Allocates memory for the internal data structures required to decompress files, and then creates and initializes them.
LZOpenFile Creates, opens, reopens, or deletes the specified file.
LZRead Reads (at most) the specified number of bytes from a file and copies them into a buffer.
LZSeek Moves a file pointer a number of bytes from a starting position.


mfg
umbrasaxum
 
Zurück