/********************************
* short_file_name.c
*
*********************************/
#include <stdio.h>
#include <windows.h>int main(int argc,char *argv[])
{
int str_len;
if(NULL == argv){
printf("argv error\n");
return 0;
}
str_len = strlen(argv[1]);
argv[1] += str_len;while('\\' != *argv[1])
{
argv[1]--;
}
argv[1]++;
printf("%s\n",argv[1]);
ShellExecute(NULL,"open","D:\\QuickBoot\\get_file_name.bat",argv[1],NULL,SW_SHOWNORMAL);
}
/********************************
* get_file_name.bat
*
*********************************/
mshta vbscript:clipboarddata.setdata("text","%1")(close)/********************************
* new.bat
*
*********************************/
@echo offshort_file_name.exe %1
/********************************
* si
*
*********************************/
D:\QuickBoot\new.bat %f