Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mit Dos.h eine Datei in Ordner verschieben, KLAPPT NICHT!

Empfohlene Antworten

Veröffentlicht

Hey Leute!

HILFE!!!!!!!!!!!

Ich möchte lediglich eine Datei von F:\.....irgendwas nach C:\Ordner\irgendwas verschieben.

Das klappt nicht!

Er verschiebt die Datei zwar, aber nicht in den ORDNER, sondern eine position höher, also direkt auf C.

Jemand ne Idee oder kennt das?

Quellcode kann ich Euch nicht geben, das ist zuvie, und wenn ich nur den relevanten Teil rauspicke, sind da zu viele unbekannte Variablen...

Naja, hier ein bischen Quellcode...

int verschieben(char *xlsptr, char *docptr, char* cqnr, char* cqnr2, int *Kontrolle)

{


	char new1[MAX];

	char new2[MAX];


	char old1[MAX];

	char old2[MAX];


	char Aufruf[MAX];

	char Aufruf2[MAX];


	FILE *inidatei;


	memset(new1,  '\0',MAX);

	memset(new2,  '\0',MAX);

	memset(old1,  '\0',MAX);

	memset(old2,  '\0',MAX);



	strcpy(old1, "F:\\DATA\\Outlook\\Attachments\\Temp\\");

	strcpy(old2, "F:\\DATA\\Outlook\\Attachments\\Temp\\");



	inidatei = fopen ("F:\\DATA\\Outlook\\ini.txt", "r+");



	fgets(new1, MAX, inidatei);


	if(*Kontrolle==1)

	{


		strcat(new1,cqnr);

		strcat(new1,"\\");

	}

	else

	{

		strcat(new1,cqnr2);

		strcat(new1,"\\");

	}


	strcpy(new2, new1);

	strcat(old1, xlsptr);

	strcat(old2, docptr);


	strcat(new1, xlsptr);

	strcat(new2, docptr);


	strcpy(Aufruf, "move ");

	strcpy(Aufruf2, "move ");


	strcat(Aufruf, old1);

	strcat(Aufruf, " ");

	strcat(Aufruf, new1);


	system(Aufruf);


	strcat(Aufruf2, old2);

	strcat(Aufruf2, " ");

	strcat(Aufruf2, new2);


	system(Aufruf2);


	printf("Erster Aufruf %s\nZweiter Aufruf %s\nNeuer Ordner 1 %s\nNeuer Ordner 2%s\n",Aufruf, Aufruf2, new1, new2);

	fclose(inidatei);


	return 0;

}


probiers mit SHFileOperation, bei mir ging das.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.