moving files
i have two querries
1.how can i use C commands(not "mv" command) to cut and paste a file from one folder to another.... 2.and also how can i do cut,copy and paste text in text box i am using linux |
My C is a little rusty, but there was a command which allowed you to use a local command (a linux command on a Linux box, but the program wouldn't work on a windows box)
e.g. sys(mv file) Your bet bet is to ask at a c forum - http://cboard.cprogramming.com/ |
If you have the filenames in strings (or can put them in strings), you can create a string containing the entire command you want to run, for example "mv /path1/file1 /path2/file2" and then use the 'system' function to execute the command, for example: system(commandstring)
Try 'man system' in a terminal to view the details of the system command (and note that it needs you to include stdlib.h). As for text in a textbox, I assume you are still talking about programming (if not, my apologies), and that is a completely different matter. I think it depends on what graphical API you use with your program (for example GTK, Qt,...) and I don't know of any easy way to move text to/from what I assume is a console-based program other than using Ctrl-Shift-c and Ctrl-Shift-v to actually copy and paste text to/from the terminal window. Hope that helps. |
All times are GMT -5. The time now is 07:03 PM. |